Fix bar chart exception.

Avoid a NPE when the expecteds array is null when
generating a bar chart.