fixed NaN to string comparison