also add null check in comparator of nomenclaturalReferenceSelectionDialog