/**
 * This function takes a list of social worker notes and appends new notes to it.
 */
fun updateSocialWorkerNotes(notes: MutableList<String>, newNotes: List<String>): List<String> {

    // Checking if the input is a list
    if (notes !is MutableList) {
        return listOf("Invalid input. The 'notes' parameter must be a list.")
    }

    // Checking if the new notes are non-empty and list type
    if (newNotes.isEmpty() || newNotes !is List) {
        return listOf("Invalid input. 'newNotes' must be a non-empty list.")
    }

    // Updating the notes by appending newNotes
    notes.addAll(newNotes)

    return notes
}
/**
 * This function takes a list of social worker notes and appends new notes to it.
 */
fun updateSocialWorkerNotes(notes: MutableList<String>, newNotes: List<String>): List<String> {
/**
 * This function takes a list of social worker notes and appends new notes to it.
 */
fun updateSocialWorkerNotes(notes: MutableList<String>, newNotes: List<String>): List<String> {

    // Checking if the input is a list
    if (notes !is MutableList) {
        return listOf("Invalid input. The 'notes' parameter must be a list.")
    }

    // Checking if the new notes are non-empty and list type
    if (newNotes.isEmpty() || newNotes !is List) {
        return listOf("Invalid input. 'newNotes' must be a non-empty list.")
    }

    // Updating the notes by appending newNotes
    notes.addAll(newNotes)

    return notes
}