Another option would be to just use a list instead of a queue. Then can check for empty in the guard.