Added ability to check whether an element is in the heap, and do conditional insert/update operations based on that