private static <T> List<T> guard(List<? extends T> list) {
    return list == null || list.isEmpty() ? emptyList() : unmodifiableList(list);
  }
private static <T> List<T> guard(List<? extends T> list)