Add try/catch around d3 data selection