improve root object deserialization checks
Merge branch 'master' into formatting