code: public static <T> void consumeIfNotNull(T target, Consumer<T> consumer) {
          Optional.ofNullable(target).ifPresent(consumer);
      }
docs: Consume if not null.
  
  @param <T>      the type parameter
  @param target   the target
  @param consumer the consumer