Functional Javascript — Null, Undefined and the Option Pattern
Tibor Botos
51
How about not using ===, but just ==? This does everything you seem to want.
These expressions all evaluate to true:
undefined == null
"" != null
0 != null
Don't make life any harder than it has to be :)