added check for NaN condition while generating series data