Replace has -> haskey