Comparing equality of vars

Hmm this is really odd. Im trying to create a ‘simple’ check statement for a textbox of type input. I used the following to check whether the user has entered something in the textbox



if(subject =="" || message =="")
{
       trace("please enter something");            
}

Simple eh ? well unfortunately if the user hits the space key in both these text boxes this statement validates false ! :(…
What am I doing wrong !? lol, I even tried


if(subject ==null || message ==null)
{
       trace("please enter something");            
}

and i get same problem…such a noob question I know