Any performance issues with this code
<p>this is probably going over the top, but I was after a function that assigns a value to my class property if the value from the database is not null and do nothing if it is. I could do this with if statements but I was after a one liner. I want this to go everywhere in my code but before doing so was just wondering if this is the right way to go about it with performance in mind. Thanks.</p>

<p>Calling code: assign(variable, value)</p>

<pre><code>Utils.Assign(dataSet.Tables[0].Rows[0]["Assigned"], ref this.Assigned);
</code></pre>

<p>Utils Functions:</p>

<pre><code>public static void Assign(object value, ref Boolean variable)
{
    if (IsRealString(value)) // Check 
    {
        switch (IsBoolean(value.ToString())) { case true: variable = Convert.ToBoolean(value); break; }
    }
}

public static Boolean IsBoolean(String s)
{
    Boolean bit;
    if (Boolean.TryParse(s, out bit))
        return true;
    else
        return false;
}

public static bool IsRealString(object s)
{
    return s != null &amp;&amp; !String.IsNullOrEmpty(s.ToString());
}
</code></pre>
