code: public static <P, T> PositionFactory<P, T> optional(Function<? super P, ? extends T> accessor) {
          Validate.isInstanceOf(Accessor.class, accessor, "Cannot detect property from %s; missing %s?", accessor,
              THERIAN_PROPERTY_METHOD_WEAVER);
          final boolean optional = true;
          return new PositionFactory<>(((Accessor<? super P, ? extends T>) accessor).propertyName, optional);
      }
docs: Create a {@link Property.PositionFactory} for the optional property specified by {@code accessor}, whose original
  source form is expected to have been a method reference for a valid Java bean accessor method, in which case it
  is required that the calling class be processed with the {@code therian-property-method-weaver} for Apache
  Commons Weaver, which translates the method call. Alternatively the {@link Accessor} class can be explicitly
  instantiated. A position created from such a factory will silently return {@code null} as its value if its
  parent's value is {@code null}.
  
  @param accessor
  @return {@link PositionFactory}
  @throws IllegalArgumentException if {@code accessor} is not an {@link Accessor} instance.