Fix a case when result of validation expression is a primitive type