TMDM-7765: "Changing element's type fails when it contains a null FK"

Fix NPE when looking up for a null FK value (unset field) during comparison of old and new version of record.
Adds unit test for issue.
(https://jira.talendforge.org/browse/TMDM-7765)
Merge branch 'maintenance/5.6'