asKeyOrNull

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