Replace Number.isNaN with isNaN

Looks like Number.isNaN can be troublesome in some environments. It is
better to use just plain isNaN instead.
Merge pull request #1 from bebraw/isnan

Replace Number.isNaN with isNaN