In floating point point comparisons, NaN will not equal itself so if it arg doesn't equal arg, it's NaN. I'm using this because isNaN is extremely slow.