removeLastOrNull

fun removeLastOrNull(): T?

Removes the last element from this list and returns that removed element, or returns null if this list is empty.