code: private void checkForNull(String name, Object value) {
          if(name == null) {
              throw new NullPointerException("name must not be null");
          }
          if(value == null) {
              throw new NullPointerException("value must not be null");
          }
      }
docs: Checks the name and value of an attibute name/value pair to see if either of them are null.  If either is null
  a {@link NullPointerException} is thrown.
  @param name The name of the attribute to check.
  @param value The value of the attribute to check.