fun notNullValues(list: MutableList) { list.replaceAll { it.length.toString() } } fun nullableValues(list: MutableList) { list.replaceAll { it?.run { length.toString() } } }