code: @SuppressWarnings("unchecked")
      @NonNull
      public static <T> List<T> unmodifiableNonNullList(@Nullable List<T> list) {
          return list == null || list.isEmpty()
                  ? (List<T>) emptyList()
                  : unmodifiableList(list);
      }
docs: Converts list of something to unmodifiable non-null list.
  
  @param list list to convert, can be {@code null}.
  @return non-null, unmodifiable list of something.