If there are no attributes, use an empty array.
Merge pull request #22 from datacentred/fix_empty_attrs

Addresses #20