factor out each object type
a dict iterates on its keys
falsy values can be stored too
naive pop()