public static <T> T getClientProperty(Component component, @NotNull Class<T> type) {
    Object obj = ClientProperty.get(component, type);
    return type.isInstance(obj) ? type.cast(obj) : null;
  }
public static <T> T getClientProperty(Component component, @NotNull Class<T> type)