You can use the dictionary.containsKey() function to find out whether a specified string is a key in the dictionary. If the caseSensitive dictionary property is set to NO, case is not considered; otherwise, the function seeks an exact match.
Use containsKey() in a logical expression only.