fix check for empty search string