In JavaScript it's only the value undefined that is interchangeable with null, and only if you use == (two equal signs vs explicit check with three equal signs). eg if(foo==null) so I would say it's extremely rare, but if you are feeling adventurous you could of course write if(foo) and it would match false, undefined, null, 0, empty string, and NaN. Which could be an issue if for example a variable is either a number (0) or null.