Added more validation for the models.