Error handling in model.check