allows null as rootElement