The return value can also be `undefined` if there was an error. As a consequence, the type cast on the `return` should be moved to to the first argument to `ol.xml.pushParseAndPop`. Sorry, my bad again.