code: public static <T extends Collection<?>> T checkNonEmpty(T collection, String name) {
          checkNotNull(collection, name);
          checkPositive(collection.size(), name + ".size");
          return collection;
      }
docs: Checks that the given argument is neither null nor empty.
  If it is, throws {@link NullPointerException} or {@link IllegalArgumentException}.
  Otherwise, returns the argument.