Added a helper function to check models