Yes, it's goofy that typeof (NaN) == 'number'. But it's not that unreasonable to have a numeric value that's explicitly invalid. Pointers and references in other languages have null, which is a legal value for any type of object, but is explicitly invalid if used as an object.
Also, isNaN is global.