@Contract(pure=true)
  public static <T> T getLastItem(@Nullable List<? extends T> list, @Nullable T def) {
    return isEmpty(list) ? def : list.get(list.size() - 1);
  }
@Contract(pure=true)
  public static <T> T getLastItem(@Nullable List<? extends T> list, @Nullable T def)