check for NaNs