fix a triple comparator bug found serializing periodic table ontology.
Added code to ignore sorting errors and log a warning.