code: public <T> T asOrElse(Class<T> clazz, @NonNull Supplier<T> supplier) {
        if (isNull()) {
           return supplier.get();
        }
        T value = as(clazz);
        if (value == null) {
           return supplier.get();
        }
        return value;
     }
docs: Converts the underlying object to the given class type.
  
  @param <T>      the type parameter
  @param clazz    The class to convert to
  @param supplier The supplier to use to generate a default value
  @return This object as the given type or null if the wrapped object is null