prevents "undefined" showing up when visiting the search page without a search term