Update utils.py

If the input string was given as an integer, the conversion failed. 
There might be better solutions to the problem than the one I propose, this is mostly to raise awareness of the issue.
Merge pull request #5 from matteobachetti/patch-2

Update utils.py