code: public static Name getArgumentAsName(Object arg) {
          if (arg instanceof String) {
              return LdapUtils.newLdapName((String) arg);
          } else if (arg instanceof Name) {
              return (Name) arg;
          } else {
              throw new IllegalArgumentException(
                      "First argument needs to be a Name or a String representation thereof");
          }
      }
docs: Get the argument as a Name.
  
  @param arg
  an argument supplied to an Ldap operation.
  @return a Name representation of the argument, or the Name itself if it
  is a Name.