class CheckExpressionTypeValidator implements ConstraintValidator<CheckExpressionType, ClientExpressionContainer>, ValidationErrorDescriptorBuilder {

    @Override
    public boolean isValid(ClientExpressionContainer value, ConstraintValidatorContext context) {
        if (value == null || value.getObject() == null) {
            return true;
        }

        return acceptedExpressions.contains(value.getObject().getClass());
    }

}