ADDED hasEntity method (ugly)