cleaner search string by removing all nil values