keep same behavior as dict(item) when using item.encode().

That is, ignore values what weren't set.
added item encode tests.