code: public static String checkNotNullOrEmpty(String arg, String argName) throws NullPointerException, IllegalArgumentException {
          Preconditions.checkNotNull(arg, argName);
          checkArgument(arg.length() > 0, argName, "Cannot be an empty string.");
          return arg;
      }
docs: Throws a NullPointerException if the arg argument is null. Throws an IllegalArgumentException if the String arg
  argument has a length of zero.
  
  @param arg     The argument to check.
  @param argName The name of the argument (to be included in the exception message).
  @return The arg.
  @throws NullPointerException     If arg is null.
  @throws IllegalArgumentException If arg is not null, but has a length of zero.