Overriding Contains and GetOrElse functions for TreeSet and TreeMap