minOrNull

fun ByteArray.minOrNull(): Byte?
fun ShortArray.minOrNull(): Short?
fun IntArray.minOrNull(): Int?
fun LongArray.minOrNull(): Long?
fun CharArray.minOrNull(): Char?

Returns the smallest element or null if there are no elements.

fun FloatArray.minOrNull(): Float?
fun DoubleArray.minOrNull(): Double?

Returns the smallest element or null if there are no elements. If any of elements is NaN returns NaN.