Improve error for check theory assertions with model (#7679)