handle null values in chart.js