/**
 * Given an actor dictionary, update the value associated with the given key.
 * If the key does not exist in the dictionary, add a new key-value pair to it.
 * If the key already exists and the value is null, update it with the given value.
 *
 * @param actor A dictionary containing actor information
 * @param key The key to be updated/added
 * @param value The value to be associated with the key
 */
fun updateActorInfo(actor: MutableMap<String, String?>, key: String, value: String) {

    if (key in actor) {
        if (actor[key] == null) {
            // Case 1: Key exists and the value is null, update it
            actor[key] = value
        }
    } else {
        // Case 2: Key does not exist, add a new key-value pair
        actor[key] = value
    }
}
/**
 * Given an actor dictionary, update the value associated with the given key.
 * If the key does not exist in the dictionary, add a new key-value pair to it.
 * If the key already exists and the value is null, update it with the given value.
 *
 * @param actor A dictionary containing actor information
 * @param key The key to be updated/added
 * @param value The value to be associated with the key
 */
fun updateActorInfo(actor: MutableMap<String, String?>, key: String, value: String) {
/**
 * Given an actor dictionary, update the value associated with the given key.
 * If the key does not exist in the dictionary, add a new key-value pair to it.
 * If the key already exists and the value is null, update it with the given value.
 *
 * @param actor A dictionary containing actor information
 * @param key The key to be updated/added
 * @param value The value to be associated with the key
 */
fun updateActorInfo(actor: MutableMap<String, String?>, key: String, value: String) {

    if (key in actor) {
        if (actor[key] == null) {
            // Case 1: Key exists and the value is null, update it
            actor[key] = value
        }
    } else {
        // Case 2: Key does not exist, add a new key-value pair
        actor[key] = value
    }
}