@SuppressWarnings( "unchecked" )
	static <T> T clientProperty( JComponent c, String key, T defaultValue, Class<T> type ) {
		Object value = c.getClientProperty( key );
		return type.isInstance( value ) ? (T) value : defaultValue;
	}
Returns the value of the specified client property if it is an instance of
the specified type. Otherwise, defaultValue is returned.

@since 2
flatlaf-core/src/main/java/com/formdev/flatlaf/FlatClientProperties.java