ensure input is converted to a string

fixes https://github.com/rubys/nokogumbo/issues/2