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

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

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

@param string|null $key

@return bool
Checks if key exists and not null .