gabin
private fun <T> mutableListOfNulls(size: Int) = (0..<size).map<Int, T?> { null }.toMutableList()
Joffrey
val list = MutableList<YourType?>(size) { null }