getOrNull

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

if index is in range of buffer, return the value. Otherwise, return null.