added null-reference check


Fix for IE8 when array of dataset objects is terminated with a , (for exampe):

datasets: [
        {
            data: [],
            label: "label1",
            fillColor: "rgb(220,220,220)",
            strokeColor: "rgb(220,220,220)",
            pointColor: "rgb(220,220,220)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgb(220,220,220)",
        },
        {
            data: [],
            label: "label2",
            fillColor: "rgb(151,187,205)",
            strokeColor: "rgb(151,187,205)",
            pointColor: "rgb(151,187,205)",
            pointStrokeColor: "#fff",
            pointHighlightFill: "#fff",
            pointHighlightStroke: "rgb(151,187,205)",
        },
    ]