checking for string type before calling trim() (for issue #169)

Proposed fix for https://github.com/kangax/html-minifier/issues/169