Check first that we have an entity