code: private static boolean isValidId(Object idValue, DataType identifierType) {
      boolean validId = false;
      if (idValue != null) {
        switch (identifierType) {
          case LONG:
          case LONG_OBJECT:
            validId = (long) idValue != 0;
            break;
          case STRING:
            validId = ((String) idValue).trim().length() > 0;
            break;
          default:
            // we should never get here
            break;
        }
      }
      return validId;
    }
docs: Checks to see if the given value is a valid identifier for the given ID type.
  
  @param idValue
  the ID value
  @param identifierType
  the identifier type
  @return <code>true</code>, if the given value is a valid identifier; <code>false</code>,
  otherwise. For STRING type, the ID is valid if it it contains at least one printable
  character. In other words, if ((String) idValue).trim().length() > 0. For numeric
  types, the ID is valid if it is not <code>null</code> or zero.