title: DBNull error is coming up
body: <p>I have a database table as</p>
  
  <pre><code>FruitCrateTable FruitCrateID, FruitCrateName, FruitGarden
  </code></pre>
  
  <p>Now I also created a Stored procedure as,</p>
  
  <pre><code>CREATE procedure [dbo].[GetFruitCrate]
  (
      @FruitCrateID int,
      @FruitCrateName varchar(222)
  )
  AS
  
  SELECT 
      *
  FROM 
      FruitCrateTable
  WHERE
      FruitCrateID = @FruitCrateID
  and
      FruitCrateName = @FruitCrateName 
  </code></pre>
  
  <p>Now when I try to check if FruitGarden is null or not using DataAccess,</p>
  
  <p>I created instance of row as,</p>
  
  <pre><code> public myDataAccess.DataAccess.GetFruitCrateRow fruitCrateRow;
   //then
  
   if (!string.IsNullOrEmpty(fruitCrateRow.FruitGarden))
              {
  //do something but i am getting error, how can i fix this issue ?
  else { // do something else }
  </code></pre>
  
  <p>Error,</p>
  
  <pre><code>The value for column &amp;#39;FruitGarden&amp;#39; in table &amp;#39;GetFruitCrate&amp;#39; is DBNull.&lt;/message&gt;&lt;full&gt;System.Data.StrongTypingException: The value for column &amp;#39;FruitGarden&amp;#39; in table &amp;#39;GetFruitCrate&amp;#39; is DBNull. ---&amp;gt; System.InvalidCastException: Unable to cast object of type &amp;#39;System.DBNull&amp;#39; to type &amp;#39;System.String&amp;#39;.
  </code></pre>
  
  <p><em><strong>I left Fruit Garden as Null as it can be null</em></strong></p>
  
  <p><strong>Update</strong></p>
  
  <p>when i try fruitCrateRow.FruitGarden != DBNull.Value I get Error     Operator '!=' cannot be applied to operands of type 'string' and 'System.DBNull</p>