/**
 * This exercise tests your knowledge on the intersection of "is operator" and "dictionary methods".
 * You need to write a function that checks if a given dictionary contains the key 'artist' and its corresponding value is of type str.
 * The function should return True if the key exists and the value is of type str, and False otherwise.
 *
 * @param dictionary A dictionary to be checked.
 * @return A boolean value indicating if the 'artist' key exists and its value is of type str.
 */
fun isArtist(dictionary: Map<String, Any>): Boolean {

    // Check if 'artist' key exists in the dictionary
    if (dictionary.containsKey("artist")) {
        // Check if the value corresponding to the 'artist' key is of type str
        if (dictionary["artist"] is String) {
            return true
        }
    }
    return false
}
/**
 * This exercise tests your knowledge on the intersection of "is operator" and "dictionary methods".
 * You need to write a function that checks if a given dictionary contains the key 'artist' and its corresponding value is of type str.
 * The function should return True if the key exists and the value is of type str, and False otherwise.
 *
 * @param dictionary A dictionary to be checked.
 * @return A boolean value indicating if the 'artist' key exists and its value is of type str.
 */
fun isArtist(dictionary: Map<String, Any>): Boolean {
/**
 * This exercise tests your knowledge on the intersection of "is operator" and "dictionary methods".
 * You need to write a function that checks if a given dictionary contains the key 'artist' and its corresponding value is of type str.
 * The function should return True if the key exists and the value is of type str, and False otherwise.
 *
 * @param dictionary A dictionary to be checked.
 * @return A boolean value indicating if the 'artist' key exists and its value is of type str.
 */
fun isArtist(dictionary: Map<String, Any>): Boolean {

    // Check if 'artist' key exists in the dictionary
    if (dictionary.containsKey("artist")) {
        // Check if the value corresponding to the 'artist' key is of type str
        if (dictionary["artist"] is String) {
            return true
        }
    }
    return false
}