Test XElement constructed from array with null values as object.
Covers #20151.
Fixes XContainer attempt to create a XNode from a null value.
Fixes #20151.
Merge pull request #1242 from esdrubal/xelement

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