Adding exception handling in case a search fails, returns an empty search