function decodeType($type, $value): \Plasma\Types\TypeExtensionResultInterface {
        if($type === null && $this->enabledFuzzySearch) {
            /** @var \Plasma\Types\TypeExtensionInterface  $decoder */
            foreach($this->dbTypes as $dbType => $decoder) {
                if($decoder->canHandleType($value, null)) {
                    return $decoder->decode($value);
                }
            }
        } elseif(isset($this->dbTypes[$type])) {
            return $this->dbTypes[$type]->decode($value);
        }
        
        throw new \Plasma\Exception('Unable to decode given value');
    }