Adds a function to test if a string contains only whitespace.