Added check for nil queue data