protected function validateBlockType($blockType)
    {
        if (!$blockType) {
            throw new Exception\InvalidArgumentException('The block type name must not be empty.');
        }
        if (!$blockType instanceof BlockTypeInterface) {
            if (!is_string($blockType)) {
                throw new Exception\UnexpectedTypeException($blockType, 'string or BlockTypeInterface', 'blockType');
            }
            if (!preg_match('/^[a-z][a-z0-9_]*$/iD', $blockType)) {
                throw new Exception\InvalidArgumentException(
                    sprintf(
                        'The "%s" string cannot be used as the name of the block type '
                        . 'because it contains illegal characters. '
                        . 'The valid block type name should start with a letter and only contain '
                        . 'letters, numbers and underscores ("_").',
                        $blockType
                    )
                );
            }
        }
    }