The getElementById method, must return the first element in tree order, within the ‘svg’ element's descendants, whose ID is elementId, or null if there is no such element.
But the corresponding IDL is Element getElementById(DOMString elementId); which does not allow null.
Per https://svgwg.org/svg-next/struct.html#__svg__SVGSVGElement__getElementById:
But the corresponding IDL is
Element getElementById(DOMString elementId);
which does not allow null.