code: public static <T> T checkNotEmpty(T reference,
                                        @Nullable String errorMessageTemplate,
                                        @Nullable Object... errorMessageArgs) {
          checkArgument(reference != null, "Expected non-null reference");
          check(reference, not(isEmptyObject()), errorMessageTemplate, errorMessageArgs);
          return reference;
      }
docs: Performs emptiness and nullness check.
  <p>
  Supports the following types:
  String, CharSequence, Optional, Stream, Iterable, Collection, Map, Object[], primitive[]
  </p>
  
  @param reference            reference to check
  @param errorMessageTemplate a template for the exception message should the
  check fail. The message is formed by replacing each {@code %s}
  placeholder in the template with an argument. These are matched by
  position - the first {@code %s} gets {@code errorMessageArgs[0]}, etc.
  Unmatched arguments will be appended to the formatted message in square
  braces. Unmatched placeholders will be left as-is.
  @param errorMessageArgs     the arguments to be substituted into the message
  template. Arguments are converted to strings using
  {@link String#valueOf(Object)}.
  @param <T>                  the reference type
  @return the checked reference
  @throws IllegalArgumentException if the {@code reference} is empty
  or the reference type is not supported
  @throws NullPointerException     if the {@code reference} is null
  or the check fails and either {@code errorMessageTemplate} or {@code errorMessageArgs} is null
  (don't let this happen)