Fix for when `value` is a 2-character string

`(value, attributes) = value` also succeeds when `value` is a
2-character string, not only a 2-item tuple/list.

Now it explicitly checks for a dictionary, so attributes doesn't end up a string.