public function getType($key, $type)
    {
        if (is_array($key))
        {
            $args = $key;
        }
        else
        {
            $args = func_get_args();
            $type = array_pop($args); // Type
        }
        $val = $this->dget($args);

        if ($val === null)
            throw new \OutOfRangeException("Key " . implode('.', $args) . " does not exist");

        $checker = $type instanceof Type ? $type : new Type($type, ['unstrict' => true]);
        try
        {
            $value = $checker->filter($val);
        }
        catch (\InvalidArgumentException $e)
        {
            throw new \DomainException("Key " . implode('.', $args) . " is not " . (string)$checker);
        }

        return $value;
    }