Iterate over bpmn types

I am trying to collect all types, for instance: bpmn:Task, bpmn:DataObjectReference etc.
and to store them in a combobox.
I already figured out how I collect the id’s with the following function:

var elementRegistry = bpmnModeler.get('elementRegistry');
	elementRegistry.forEach(function(elem, gfx) {
		let option = document.createElement("option");
		option.innerHTML = elem.businessObject.get('id');
		option.value = elem.businessObject.get('id');
		taskTypeEl.appendChild(option);
	});

My first thinking was to replace ‘id’ by ‘type’, but then I just get undefined values in my combobox. As I mentioned before, the function above works fine for filling my combobox with the id’s, but how can I get the types?
Kind regards

For further assistance, please share a CodeSandbox that reproduces your issue in a way that we can inspect it.