code: public Object getId(Object objectToGet)
              throws InvalidObjectReaderException {
          if (objectToGet == null) {
              throw new IllegalArgumentException("Given object may not be null");
          }
          if (objectToGet.getClass() != entityClass) {
              throw new InvalidObjectReaderException("Class of target object does not correspond with entityclass of this reader.");
          }
          if (idAccessor == null) {
              return null;
          } else {
              return idAccessor.getValueFrom(objectToGet);
          }
      }
docs: Returns the value of the id of the given object if it is present. If no id property
  could be found, null is returned.
  
  @param objectToGet the object from which the id is desired.
  @return the value of the id property of the given object
  @throws IllegalStateException     if no value can be retrieved from the object.
  @throws InvalidObjectReaderException object and entity class mismatch