[FaceRest] Check existence of queue elements before calling front().

Calling front() with empty queue is undefined.