Fixes #(Verify that a model is valid)

There is a function for this.