Throws exception when getting max from empty priority queue.