@SuppressWarnings("unchecked")
  @Contract("null,_ -> null")
  public static <T> @Nullable T findInHierarchy(@Nullable Component component, @NotNull Key<T> key) {
    Object value = findInHierarchy(component, (Object)key);
    return value != null ? (T)value : null;
  }
@SuppressWarnings("unchecked")
  @Contract("null,_ -> null")
  public static <T> @Nullable T findInHierarchy(@Nullable Component component, @NotNull Key<T> key)