title: checking if variable is NULL
body: <p>I am working on a project with PDFSharp. Sadly as a VB.Net developer, the examples they provided were written in C#. I'm having a problem of checking if a variable is <code>null</code>.<br></p>
  
  <p>On C#, the code is declared like this</p>
  
  <pre><code>PdfDictionary resources = page.Elements.GetDictionary("/Resources");
    if (resources != null) 
    'do stuff here
  </code></pre>
  
  <p>Im having a problem with the second line, </p>
  
  <blockquote>
    <p>if (resources !=null)</p>
  </blockquote>
  
  <p>So far, this is what I've done on VB, and I have also read <a href="http://blog.slaks.net/2010/12/nothing-vs-null.html" rel="nofollow">this Blog</a> from sLaks.</p>
  
  <blockquote>
    <p>Dim resources As New PdfDictionary?()</p>
  </blockquote>
  
  <p>But it is giving me some errors.</p>
  
  <p>Simply setting resources to <code>nothing</code> would yield its default value, could be an int, or whatsoever. I wanted it to be compared to a NULL. <br>
  This is the full <a href="http://www.pdfsharp.net/wiki/ExportImages-sample.ashx" rel="nofollow">code</a>.</p>