private function checkName(&$name)
    {
        if (! is_string($name)) {
            throw new InvalidTypeException(
                'The name must be a string value, ' . gettype($name) . ' is given.'
            );
        }

        $name = strtolower(trim($name));

        if (empty($name)) {
            throw new Exception('The attribute name must not be empty.');
        }
    }