Adds tonumbervalue for NaN returns. Fixes #298
Merge pull request #323 from tessel/tcr-298

Adds tonumbervalue for NaN returns. Fixes #298