Fix NullReferenceException when the search returns no results

While using the application today I noticed it crashes with a NullReferenceException when the search returns no results. I think this small change is enough to fix it.