nan, inf check