code: public Optional<T> ifPresent(final Consumer<? super T> consumer) {
          if (isPresent()) {
              consumer.accept(get());
          }
  
          return this;
      }
docs: If a value is present, invoke the specified consumer with the value, otherwise do nothing.
  
  @param consumer consumer to be invoked if present.
  @return this Optional
  @since 1.7.8