Fixing bug in attr(key, val) on empty objects.