There's actually a check for null values in lines 217 and 218 of the routine. These checks need to be made earlier in the routine, and over-write any null values with a zero.
This can be fixed by adding a check for null mean or median values and replacing them with a zero in the updateAverageChart function contained in the chartUpdateData.js file. An additional line of code is required in four places, of the form:
It doesn't affect the data displayed in the charts at all, so what the user sees is not affected. As it stands you are faced with a blank plot until you click on the legend of the offending null-containing series. At that point the offending series is hidden and the rest of the series are displayed.