If the striker gets an edge that would have hit the wicket but strikes the batsman instead is it leg before wicket?
It is not.
It is impossible to assess how much deflection there is in any such nick, so it is impossible to confirm that the ball would have hit the wicket. No matter what an observer may think.
Law 36.1 refers to LBW. Subclause 36.1.3 states that for a batsman to be out LBW;
"the ball not having previously touched his/her bat, the striker intercepts the ball, either full-pitch or after pitching, with any part of his/her person"
So, the ball must hit the person but not the bat first.