Add condition in hook_entity_delete