check if an entity has been deactivated already before deactivating