implement dict_free, dict_has and dict_del