title: HtmlAgilityPack Error: Object reference not set to an instance of an object
body: <p>I have been using this code for months and it has been working perfectly for me but now I am getting this error: <code>Object reference not set to an instance of an object.</code> at this line of code:</p>
  
  <pre><code>Dim Page_Most_Recent_Quarter As Date = document.DocumentNode.SelectSingleNode("//*[@id='financials-iframe-wrap']/div/table//tr[2]/th[3]").InnerText
  </code></pre>
  
  <p>Here is the full code:</p>
  
  <pre><code>Dim wreq As HttpWebRequest = WebRequest.Create("http://www.nasdaq.com/symbol/GOOG/financials?query=income-statement&amp;data=quarterly")
      wreq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5"
      wreq.Method = "get"
      Dim prox As IWebProxy = wreq.Proxy
      prox.Credentials = CredentialCache.DefaultCredentials
      Dim document As New HtmlAgilityPack.HtmlDocument
      Dim web As New HtmlAgilityPack.HtmlWeb
      web.UseCookies = True
      web.PreRequest = New HtmlAgilityPack.HtmlWeb.PreRequestHandler(AddressOf onPreReq)
      wreq.CookieContainer = cookies
      Dim res As HttpWebResponse = wreq.GetResponse()
      document.Load(res.GetResponseStream, True)
      Dim Page_Most_Recent_Quarter As Date = document.DocumentNode.SelectSingleNode("//*[@id='financials-iframe-wrap']/div/table//tr[2]/th[3]").InnerText
  </code></pre>
  
  <p>I don't think anything has change that would affect this code.  I cannot figure out what is wrong.  </p>