added the entityExists method to the EntityManager