Sync ssot

Placeholder, needs more tests and comments. 
Fixes #1919 #1814 #2057 #2191 #2177 #2125 #2100 #1848 #1790 #1532 #1389 #1308

it is correct, I guess we could move the check upstream, but either way null/undefined are valid