Fixes crash in stripWhitespace.

It crashed when given a string containing only whitespace.
Thanks, mirage.