Correct error checking in record.link