Throw if the input is not a String

Fix gh-10