Some fixes to avoid Xml::element call with null content when we actually want