Rachel just asked for something to check to see if the field had any characters other than space characters. If it does, then it's considered NOT empty. Having only 2 (or 100) spaces will return a true, meaning that the input value IS empty, if that's all it has. The name of the function is isEmpty(), and if the field has ONLY spacing character in it, then it IS EMPTY, and returns true. What you're talking about is completely different. What I wrote for Rachel works in the way she asked for it to work. If you're looking for something to check for an empty string, which means a string that you want to contain characters besides spaces, tabs, newlines, and carriage returns, then this does what you want.
If you're looking for something else, I don't quite understand what you want.