Removing JS errors if the chart is not initialized