code: public static <T1, T2, R> Optional<R> getOptionalIfExist(
              Optional<T1> firstOptional, Optional<T2> secondOptional,
              BiFunction<T1, T2, R> returnBuilderFunction) {
          return firstOptional.flatMap(t1 -> secondOptional
                  .map(t2 -> returnBuilderFunction.apply(t1, t2)));
      }
docs: Gets optional if exist.
  
  @param <T1>                  the type parameter
  @param <T2>                  the type parameter
  @param <R>                   the type parameter
  @param firstOptional         the first optional
  @param secondOptional        the second optional
  @param returnBuilderFunction the return builder function
  @return the optional if exist