function checkIDs (elem) {
    if (elem.attr?.id) {
      changedIDs[elem.attr.id] = svgCanvas.getNextId()
      elem.attr.id = changedIDs[elem.attr.id]
    }
    if (elem.children) elem.children.forEach((child) => checkIDs(child))
  }
@param {module:svgcanvas.SVGAsJSON} elem
@returns {void}