convert: do not try to export a null AST pointer