private function assertEscapeType($type)
    {
        if (! in_array($type, array_keys($this->escapeTypes), true)) {
            throw new Exception\InvalidEscaperException('Invalid escape type provided');
        }
    }