@Contract(value = "null, _ -> null", pure = true)
  public static @Nullable <T> T tryCast(@Nullable Object obj, @NotNull Class<T> clazz) {
    return clazz.isInstance(obj) ? clazz.cast(obj) : null;
  }
@Contract(value = "null, _ -> null", pure = true)
  public static @Nullable <T> T tryCast(@Nullable Object obj, @NotNull Class<T> clazz)