i am processing xml file by using following code,but how to check null reference exception which i used to get
var main = System.Xml.Linq.XDocument.Load("1.xml");
string localcellid = main.Descendants()
.FirstOrDefault(x => x.Attributes().Any(a => a.Value == "eNodeBCell_eNodeB"))
.Descendants("parameter")
.FirstOrDefault(x => x.Attributes().Any(a => a.Value == "LocalCellId"))
.Attribute("value").Value;
string eNodeBId = main.Descendants()
.FirstOrDefault(x => x.Attributes().Any(a => a.Value == "eNodeB_eNodeB"))
.Descendants("parameter")
.FirstOrDefault(x => x.Attributes().Any(a => a.Value == "eNodeBId"))
.Attribute("value").Value;