User analytics: add another range check

This commit adds a simple robustness measure: if activeTimesPerDay() is
called with an empty list, it returns right away without trying to
access the first element.

This relates to issue #596.