code: @SafeVarargs
    public static <T> T getOptionalFieldValue(Object object, String fieldName, Class<T>... fieldType)
    {
      Class<?> clazz = null;
      if(object instanceof Class<?>) {
        clazz = (Class<?>)object;
        object = null;
      }
      else {
        clazz = object.getClass();
      }
      return getFieldValue(object, clazz, fieldName, fieldType.length == 1 ? fieldType[0] : null, true);
    }
docs: Get optional field value from instance or class. Retrieve named field value from given instance or class; if field
  is missing return null. Note that this method does not throw exceptions. Also, if optional desired field type is
  present and named field is of different type returns null.
  
  @param object instance or class to retrieve field value from,
  @param fieldName field name,
  @param fieldType optional desired field type.
  @param <T> field value type.
  @return instance or class field value or null if field not found.