adding branch for NaN, along with tests
making NaN check more straightforward, capitalizing to be a more recognizable
Merge pull request #14 from component/NaN

Checking for NaN, fixes #12