Add few condition checking to bb_queue_pick_first.