Ensure xref is unique and that these fields are not NULL