handling nulls in c#
<p>I have an object like this:</p>

<pre><code>class MyObject
{
    public string Object.Prop1 { get; set; }
    public string Object.Prop2 { get; set; }
}
</code></pre>

<p>I'm writing a custom JSON converter and I'm serializing this object like this:</p>

<pre><code>Dictionary&lt;string, object&gt; OutputJson = new Dictionary&lt;string, object&gt;();

OutputJson.Add("TheProp1", MyObject.Prop1.Trim());
</code></pre>

<p>If for some reason <code>Prop1</code> is <code>null</code>, will the code encode <code>TheProp1</code> as <code>""</code> or will it crash?</p>
