If you always know that you want to have no spaces, you can call trim as soon as you save off the value:

Code:
string lastName = textbox.Text.Trim();
if (lastName != String.Empty)
{
    ...
}
You don't need to check for null here as you know the Text property of a textbox will never return null.