code: public static <T> List<T> createWhenNull(final List<T> list) {
          if (list == null) {
              return new ArrayList<T>();
          } else {
              return list;
          }
      }
docs: Returns the list when it is not null. Returns a new list otherwise.
  
  @param list The list to process, can be null
  @return The input list when it is not null, a new list otherwise