dealing with NaN