Add a sanity check to avoid running into unresolved related models.