code: public static String notNullOrEmpty(String argument, String argumentName) {
          if (argument == null || argument.trim().isEmpty()) {
              throw new IllegalArgumentException("Argument " + argumentName + " must not be null or empty.");
          }
          return argument;
      }
docs: Checks if the given String is null or contains only whitespaces.
  The String is trimmed before the empty check.
  
  @param argument     the String to check for null or emptiness
  @param argumentName the name of the argument to check.
  This is used in the exception message.
  @return the String that was given as argument
  @throws IllegalArgumentException in case argument is null or empty