The isNaN() function determines whether a value is NaN when converted to a number. Because coercion inside the isNaN() function can be surprising, you can alternatively use Number.isNaN().
isNaN(NaN); // true
isNaN(undefined); // true
isNaN({}); // true
isNaN('string'); // true
isNaN(true); // false
isNaN(null); // false
isNaN(37); // false