code: public static <K, V, A> A ifPresentApply(
              Map<K, V> map,
              K key,
              Function<? super V, ? extends A> function)
      {
          if (map instanceof UnsortedMapIterable)
          {
              return ((MapIterable<K, V>) map).ifPresentApply(key, function);
          }
          V result = map.get(key);
          return MapIterate.isAbsent(result, map, key) ? null : function.valueOf(result);
      }
docs: If there is a value in the Map tat the specified key, return the result of applying the specified Function
  on the value, otherwise return null.