We were letting Python typecast, and that causes the wrong result on Windows. Return the correct result explicitly when "nan" is found in the string. Also, small reformatting of an else if -> elif.
We were letting Python typecast, and that causes the wrong result on Windows. Return the correct result explicitly when "nan" is found in the string. Also, small reformatting of an else if -> elif.