title: Custom default value for generic parameter
body: <p>I'm trying to write a generic method to read data from <code>SQLDataReader</code>. It works really well except when I want to get custom default value for some data types. For example, for <code>string</code> I want to get <code>string.Empty</code> instead of <code>null</code>.</p>
  
  <pre><code>public static T SafeGetValue&lt;T&gt;(SqlDataReader dr, string columnName)
  {
      T returnValue = default(T);
      var value = dr[columnName];
  
      if (value != null &amp;&amp; value != DBNull.Value)
      {
          returnValue = (T)value;
      }
      else
      {
          returnValue.Null();
      }
  
      return returnValue;
  }
  
  public static object Null(this object o)
  {
      return null;
  }
  
  public static string Null(this string stringValue)
  {
      return string.Empty;
  }
  </code></pre>
  
  <p>When <code>T</code> is <code>string</code>, I'm trying to get it to goto <code>Null</code> overload of <code>string</code> but it still goes to the <code>object</code> overload. Is there any way to do this?</p>