title: How to check object is null or empty in C#.NET 3.5?
body: <p>If objects contains null or empty then how to validate or check the condition for the same?</p>
  
  <p>How to bool check whether object <strong>obj</strong> is <code>null</code> or <code>Empty</code></p>
  
  <p>I've code as follows:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          object obj = null;
  
          double d = Convert.ToDouble(string.IsNullOrEmpty(obj.ToString()) ? 0.0 : obj);
          Console.WriteLine(d.ToString());
      }
  }
  </code></pre>
  
  <p>With this code i'm getting <code>NullReference Exception</code> as  <code>Object reference not set to an instance of an object.</code></p>
  
  <p>Pls help.</p>
  
  <p>Here I'm not getting....</p>
  
  <p><strong>How to validate whether that object is <code>null</code> or <code>Empty</code> without converting into .ToString() ??</strong> </p>
  
  <p>Is there an approach to check the same??</p>