Fixes XContainer attempt to create a XNode from a null value.

**Fixes:** [#20151](https://bugzilla.xamarin.com/show_bug.cgi?id=20151).