code: public static String checkNonEmpty(String s, String msg) {
      checkArgument(!s.isEmpty(), msg);
      return s;
    }
docs: Checks that the supplied string is non-empty. If it is empty, an {@link
  java.lang.IllegalArgumentException} is thrown with the supplied message.