Update utils.py

Forgot to check for unicode instance