javagit/src/main/java/edu/nyu/cs/javagit/utilities/CheckUtilities.java
public static void checkStringArgument(String str, String variableName) {
    if (null == str) {
      throw new NullPointerException(ExceptionMessageMap.getMessage("000001")
          + "  { variableName=[" + variableName + "] }");
    }
    if (str.length() == 0) {
      throw new IllegalArgumentException(ExceptionMessageMap.getMessage("000001")
          + "  { variableName=[" + variableName + "] }");
    }
  }
public static void checkStringArgument(String str, String variableName) {
    if (null == str) {
      throw new NullPointerException(ExceptionMessageMap.getMessage("000001")
          + "  { variableName=[" + variableName + "] }");
    }
    if (str.length() == 0) {
      throw new IllegalArgumentException(ExceptionMessageMap.getMessage("000001")
          + "  { variableName=[" + variableName + "] }");
    }
  }
Checks a <code>String</code> argument to make sure it is not null and contains one or more
characters. If the <code>String</code> is null, a <code>NullPointerException</code> is
thrown. If the <code>String</code> has length zero, an <code>IllegalArgumentException</code>
is thrown.

@param str
The string to check.
@param variableName
The name of the variable being checked; for use in exception messages.