code: public T orElseDoAndReturnDefault(Consumer<Result<T>> consumer, T defaultVal) {
          if (isSuccessAndNotNull()) {
              return data;
          }
          consumer.accept(this);
          return defaultVal;
      }
docs: The consumer function receives the entire result object as parameter in case you want to log or manage the error message or code in any way.
  @param consumer
  @param defaultVal
  @return