Fix UnicodeWarning when value is not a str (#98)

Fix issue #98.