Finally I was able to find the problem and and fix accordingly (Initially, I thought this was a NameSpace related problem).
You should actually filter the LinQ expression with a condition :
where streetAddress.Element("StreetNumber") != null
Here is the correct LinQ that you should use:
var streetAddresses = from streetAddress in listing.Descendants("StreetAddress")
where streetAddress.Element("StreetNumber") != null
select new
{
streetNumber = streetAddress.Element("StreetNumber").Value,
streetDirPrefix = streetAddress.Element("StreetDirPrefix").Value,
streetName = streetAddress.Element("StreetName").Value,
streetsuffix = streetAddress.Element("StreetSuffix").Value,
City = streetAddress.Element("City").Value,
postalCode = streetAddress.Element("PostalCode").Value
};
The filtering had to be added because, the
listing.Descendants("StreetAddress")
actually returns two elements where one element does not have any child element and hence the expression gets null exception.