change Number.isNaN to isNaN for compatibility
- Number.isNaN is an upcoming standard, using isNaN
  instead for more compatibility.