@Contract("null,_ -> null")
  public static @Nullable Object findInHierarchy(@Nullable Component component, @NotNull @NonNls Object key) {
    while (component != null) {
      Object value = get(component, key);
      if (value != null) return value;
      if (component instanceof Window) break;
      component = component.getParent();
    }
    return null;
  }
@Contract("null,_ -> null")
  public static @Nullable Object findInHierarchy(@Nullable Component component, @NotNull @NonNls Object key)