Please pull parts of this check out into a function to improve readability/DRY:

var isNullNanOrUndefined = function(x) {
  return isNaN(x) || x === null || x === undefined;
};