title: returning a null value from database as a string value
body: <p>I am extracting records from a database and some of the fields do not have values (null).</p>
  
  <p>I would like to extract them as string values, how can I do this?</p>
  
  <p>I have tried the following but get an invalid cast exception.</p>
  
  <pre><code>string tc = (string)dbread["CustomerAcceptedTerms"]!= DBNull.Value.ToString() ? "Yes": "Null";
  </code></pre>
  
  <p>["CustomerAcceptedTerms"] is a bit value and it can be null</p>