@Nullable
private static String toStringRepresentation(@Nullable Object obj) {
String s = null;
if (obj != null) {
if (obj instanceof Xref) {
Xref xref = (Xref) obj;
s = xref.getIdref() + ' ' + xref.getAnnotation();
} else if (obj instanceof String) {
s = (String) obj;
} else {
s = obj.toString();
}