Controls that the string to trim is indeed a string