code: public static <T> List<T> getOrNullList(Optional<T>... optionals) {
          return Arrays.stream(optionals).map(opt -> opt.orElse(null))
                  .collect(Collectors.toList());
      }
docs: Gets or null list.
  
  @param <T>       the type parameter
  @param optionals the optionals
  @return the or null list