handle nans when removing outliers