Revert "Prevent NRE when x.Attribute returns null"

This reverts commit b4cd50f6dd981d796f3a5c973cae207122af8ca3.