Make a general has_set function to make has_pair general