Check variable for NaN.
var realIsNaN = function(value) { return typeof value === 'number' && isNaN(value); };