Being defensive when working with search results (they might be empty)