dict: add has_key? helper