ES6
Number.isNaN()
ponyfillPonyfill: A polyfill that doesn't overwrite the native method
$ npm install --save number-is-nan
var numberIsNan = require('number-is-nan');
numberIsNan(NaN);
//=> true
numberIsNan('unicorn');
//=> false
MIT © Sindre Sorhus