code: public <V> Optional<V> map(final Function<T, V> function) {
          checkNotNull(function, "Must provide non null function to map");
          if (isPresent()) {
              final V applied = function.apply(get());
              return applied == null ? Optional.<V>empty() : Optional.of(function.apply(get()));
          } else {
              return Optional.empty();
          }
      }
docs: If a value is present, map is with function, and if the result is non-null,
  return an Optional describing the result. Otherwise return an empty Optional.
  
  @param function a map function to apply to the value, if present
  @param <V>      The type of the result of the mapping function
  @return an Optional describing the result of map, if a value is present, otherwise an empty Optional