Fix issue with empty span that doesn't have attribs

Fix issue with checking for spans when they do not have any attributes.