Can I modify my data model class so a query on a property does not cause an exception if there is no instance of the class?
<p>I have the following class:</p>

<pre><code>public class DataSource
{
    [DisplayName("Value")]
    public string Value { get; set; }
    [DisplayName("Title")]
    public string Title { get; set; }
}
</code></pre>

<p>The following code to retrieve:</p>

<pre><code>    public DataSource Get(string ds)
    {
        if (ds != null &amp;&amp; ds == "0000")
            return GetDataSources().Single(s =&gt; s.Value == ds);
        return null;
    }
</code></pre>

<p>If the value of ds is null or "0000" then I need the following to 
return null but it gives an exception:</p>

<pre><code>var dsa = _dataSource.GetTitle(ds).Title;
</code></pre>

<p>Is there something I could do to make the ".Title" return null rather than an exception if ds is null or "0000"?</p>
