code: private void sanityCheck(String seriesName, double[] xData, double[] yData, double[] bubbleData) {
  
      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!!! >" + seriesName);
      }
      if (yData.length == 0) {
        throw new IllegalArgumentException("Y-Axis data cannot be empty!!! >" + seriesName);
      }
      if (bubbleData == null) {
        throw new IllegalArgumentException("Bubble data cannot be null!!! >" + seriesName);
      }
      if (bubbleData.length == 0) {
        throw new IllegalArgumentException("Bubble data cannot be empty!!! >" + seriesName);
      }
      if (xData != null && xData.length == 0) {
        throw new IllegalArgumentException("X-Axis data cannot be empty!!! >" + seriesName);
      }
      if (bubbleData.length != yData.length) {
        throw new IllegalArgumentException(
            "Bubble Data and Y-Axis sizes are not the same!!! >" + seriesName);
      }
    }
docs: /////////////////////////////////////////////////