fix has_key? method on string