fix the crash when the search results get null