function hasChild(children, name) {
	let flag = false;
	flatMapChildren(children, (child) => {
		flag = flag || (child.type && child.type.name === name);
	});
	return flag;
}
Perhaps there's a more pragmatic way to do this. Eventually, I suspect we'll have some utils to help find children.