code: @SuppressWarnings("unchecked")
      public static <E> List<E> getList(Object list, boolean nullForEmpty) {
          if (list == null) {
              if (nullForEmpty)
                  return null;
              return Collections.emptyList();
          }
          if (list instanceof List)
              return (List<E>) list;
  
          return (List<E>) Collections.singletonList(list);
      }
docs: Get the real List from a LazyList.
  
  @param list         A LazyList returned from LazyList.add(Object) or null
  @param nullForEmpty If true, null is returned instead of an empty list.
  @param <E>          the list entry type
  @return The List of added items, which may be null, an EMPTY_LIST or a
  SingletonList.