Fix TypeError caused by unicode conversion

Making sure we pass valid unicode values should take into account that
values might already be unicode types