checking for NaN in data series and skipping all NaNs