This seems a bit to complicated. What about:
```
var label;
if (input.dataset.labels) {
  var label = input.dataset.labels.split(',');
}
var settings = {
  max: parseFloat(input.max),
  min: parseFloat(input.min),
  step: parseFloat(input.step) || 1,
  angleoffset: 0,
  anglerange: 360,
 label: label
};