Throw is the input is not a String

Fix gh-10