code: @NotNull
      public <U> Optional<U> map(@NotNull Function<? super T, ? extends U> mapper) {
          if (!isPresent()) return empty();
          return Optional.ofNullable(mapper.apply(value));
      }
docs: Invokes the given mapping function on inner value if present.
  
  @param <U> the type of result value
  @param mapper  mapping function
  @return an {@code Optional} with transformed value if present,
  otherwise an empty {@code Optional}
  @throws NullPointerException if value is present and
  {@code mapper} is {@code null}