Deal better with missing results

This adds some guards to the stats calculation and views so that when there
are no results, or calculated stats from those results, things don't fall over
and the user sees something to explain what's going on.

Closes #121