Added validation for models