type validation adjusted

This one is related with this [issue](https://github.com/yiisoft/yii2/issues/3774) .
Ok.