Rewrite field_comparator so that basic fields can also be compared.