Value should contain at least one character
Strip leading and trailing spaces before insterting the value into the DB
Pupulate the SearchHistory table onlt if previous and current values aren't the same