Added a O(1) function for checking if the queue is empty