If condition to check for DBNull.Value
<p>I'm trying to check for <code>DBNull.Value</code> but in this case <code>reader["Preferences"]</code> returns {} in the immediate window (why?)</p>

<p>so when  <code>(string)reader["Preferences"];</code> executes I get a type casting error</p>

<pre><code>if (reader["Preferences"] == System.DBNull.Value)
{
     preferences = (string)reader["Preferences"];
}
</code></pre>
