Fix #788: Check if series is an empty list before doing movingAverage

After updating, I found that all my graphs that used movingAverage on a series that no longer exist would break and would 500 on the server. It is due to finding the max on an empty list. Simple check removes this issue.