fix checking model class type