equality comparer for data types using sets