Not always are strings getting passed into this function. As a result, i...

...t will cause this module to crash. I've proposed a simple fix for this problem.