def METHOD_NAME():
    """
    Test if connection object is "None" then HEAD should throw TypeError.
    """
    with pytest.raises(TypeError):
        config = Mock(spec=CORTXS3Config)
        config.get_cortx_s3_endpoint = Mock(side_effect=KeyError())
        assert CORTXS3Client(config, CONNECTION_TYPE_PRODUCER).head('/indexes/test_index1')