Avoid empty stdClass instance for empty XML node

I think you should add this, too. This will avoid creating an empty stdClass instance for an empty node.