Add condition to queue_item destroy method