And, strangely, (NaN === NaN) is false. Gotta use isNaN(NaN).
Though that undefined === undefined works, and so does Infinity === Infinity doesn't make as much sense when thought of that way; infinities aren't all equal, and undefined isn't a single kind of value that it makes sense to compare as if it were. And to counteract the sql null viewpoint, (null === null) works.
Also:
var x = parseInt("a");
x === NaN // false
alert(x); // "NaN"
doesn't make a whole lot of sense. isNaN() performs the exact same thing that === NaN implies. Especially as: {}.x // undefined
{x:undefined}.x // undefined
for(prop in {x:undefined}) alert(prop); // displays "x"
{}.x === {x:undefined}.x // true
Meh. It's a weird language. Not intending to shoot you down; just spilling my brain into a textbox.