Adding better error handling to the searchAnime function