code: static final <T> void validateValues(final T[] values, final Comparator<? super T> comparator) {
      final int lenM1 = values.length - 1;
      for (int j = 0; j < lenM1; j++) {
        if ((values[j] != null) && (values[j + 1] != null)
            && (comparator.compare(values[j], values[j + 1]) < 0)) {
          continue;
        }
        throw new SketchesArgumentException(
            "Values must be unique, monotonically increasing and not null.");
      }
    }
docs: Checks the sequential validity of the given array of values.
  They must be unique, monotonically increasing and not null.
  @param <T> the data type
  @param values given array of values
  @param comparator the comparator for data type T