protected function isValidToken($text)
    {
        // Make sure $text is string
        if (!is_string($text)) {
            throw new InvalidArgumentException(
                '$text must be string'
            );
        }

        $separators = [
            '(', ')', '<', '>', '@',
            ',', ';', ':', '\\', '"',
            '/', '[', ']', '?', '=',
            '{', '}', 32, 9
        ];

        // If contains separator, return false
        foreach ($separators as $s) {
            if (strpos($text, $s) !== false) {
                return false;
            }
        }

        // If contains control character, return false
        if (ctype_cntrl($text)) {
            return false;
        }

        return true;
    }