Validates if a value is NaN.