test: use Number.isNaN()
This PR is Code and Learn in NodeFest.
https://github.com/nodejs/code-and-learn/issues/72
Checklist
-
make -j4 test (UNIX), or vcbuild test (Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines