Use isNaN() to check for NaN values.