asIndexOrNull

Casts this PathElement as a Index and retrieves its kotlin.Int value. Returns null if the PathElement is not a Index.