Not always are strings getting passed into this function. As a result, it will cause this module to crash. I've proposed a simple fix for this problem.