getOrNull

fun <T> List<T>.getOrNull(index: Int): T?(source)

Returns the element at index, or null when the index is outside this list.