pub fn validate( value: &Value<'_>, expected: TypeId, query: &CompiledQuery, ) -> Result<(), TypeError>
Validates a value against the expected type.