Added tests for #11283. The itEncodesNullObjects test fails with the branch before the merge and succeeds with the master branch