Make datatype implement comparator