change exception to warning for NaN values