Implement Contains() for PriorityQueue