Return error when input svg is not valid and SVGSVGElement is not present in the tree instead of doing svg_root nullptr dereference. Fixes crash on https://apps.kde.org/en-gb/