fun foo(p: List): Int { val v = p[0] ?: // return -1 if null return -1 return v.length }