Change CreateSeries to return an error if there are duplicated keys