Fixing an error in respond_to?

Elements without attributes have @attributes=nil.  When calling this respond_to? method, it was erroring out, because @attributes is defined but nil.  So I added a check for @attributes.present? to ensure it's not trying to call has_key? on nil.

Example:
>> test = Ox::Element.new("test")
=> #<Ox::Element:0x10c623cb8 @nodes=nil, @attributes=nil, @value="test">