Convert a string to proper case

public static string ToProperCase(this string str)
        {
            str = str.ToText();
            return System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(str.ToLower());
        }

 public static string ToText(this object o)
        {
            if (o == null || o == DBNull.Value)
            {
                return string.Empty;
            }
            return o.ToString();
        }