Raise TypeError if unicode string is used as key

Fixes #144.