Use isnan(3) to check for NaN