code: private void sanityCheck(
        String seriesName,
        List<?> xData,
        List<? extends Number> yData,
        List<? extends Number> errorBars) {
  
      if (seriesMap.keySet().contains(seriesName)) {
        throw new IllegalArgumentException(
            "Series name >"
                + seriesName
                + "< has already been used. Use unique names for each series!!!");
      }
      if (yData == null) {
        throw new IllegalArgumentException("Y-Axis data cannot be null!!!");
      }
      if (yData.size() == 0) {
        throw new IllegalArgumentException("Y-Axis data cannot be empty!!!");
      }
      if (xData != null && xData.size() == 0) {
        throw new IllegalArgumentException("X-Axis data cannot be empty!!!");
      }
      if (errorBars != null && errorBars.size() != yData.size()) {
        throw new IllegalArgumentException("Error bars and Y-Axis sizes are not the same!!!");
      }
    }
docs: /////////////////////////////////////////////////