Checking for NaN value of "double" type has been fixed.

A condition 
    doubleVal == Double.NaN 
will return FALSE every time.

There is an explanation at the Stackoverflow: http://stackoverflow.com/a/8819776
Merge pull request #1 from alexandrklimov/master

Checking for NaN value of "double" type has been fixed.