Fix redundant check.

There is a redundant isNan() check.  I changed it to what I think was intended, however it could be simply changed by removing the second check completely.