title: C#.NET check if the object is null or not
body: <p>Am I doing this correct? I'm interested to know the possible reasons why its failing?     </p>
  
  <pre><code>Object obj = Find(id); //returns the object. if not found, returns null
  if (!Object.ReferenceEquals(obj, null))
  {
       //do stuff
  }
  else
  {
       //do stuff
  }
  </code></pre>
  
  <p>Find Method (Uses ORM Dapper). Performed unit tests on this, I believe there is no problem with this method.</p>
  
  <pre><code>public Object Find(string id)
  {
       var result = this.db.QueryMultiple("GetDetails", new { Id = id }, commandType: CommandType.StoredProcedure);
       var obj = result.Read&lt;Object&gt;().SingleOrDefault();
       return obj;
  }
  </code></pre>