Totally off the top of my head (and therefore totally untested, but it should be good)
var EnteredValue = $.trim($("#SearchText").val());
var TestValue = EnteredValue.replace(" ", "");
if (isNaN(TestValue)) {
return EnteredValue; // User must have entered a keyword
}
else {
return TestValue; // Prodict code minus all spaces
}

