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)
(cherry picked from commit 2a21afade98a17f750eb290e028989ab97638534)
(cherry picked from commit f5558a1)