public static Boolean isTypeAllowed(Class<?> clazz) {
//        Logger.getAnonymousLogger().info("checking type :  " + clazz.getName());
		if (clazz.isPrimitive() || getAllowedTypes().contains(clazz)) {
			return true;
		}
		Set<Class<?>> allowedTypes = getAllowedTypes();
		for (Class<?> allowedType : allowedTypes) {
			if (allowedType.isAssignableFrom(clazz)) {
				return true;
			}
		}
		return false;
	}