Fix error if xml is null