public function exists(?string $key = null) : bool
    {
        $key = $this->constructKey($key);

        return $this->parseKey($key, function ($part, $result) {
            return array_key_exists($part, $result);
        });
    }
public function exists(?string $key = null) : bool
    {
        $key = $this->constructKey($key);

        return $this->parseKey($key, function ($part, $result) {
            return array_key_exists($part, $result);
        });
    }
public function exists ( ? string $ key = null ) : bool { $ key = $ this -> constructKey ( $ key ) ; return $ this -> parseKey ( $ key , function ( $ part , $ result ) { return array_key_exists ( $ part , $ result ) ; } ) ; }
Checks if key exists.

@param string|null $key

@return bool
Checks if key exists .