Added catch of null-string in makediagrec