isOnlyWhitespace and tests