handle NaN equality issue