locationOrNull

inline fun <T : Any> ApplicationCall.locationOrNull(): T

Retrieves the current call's location or fails if it is not available (request is not handled by a location class), or not yet available (invoked too early before the locations feature takes place).

Despite of the name, the function fails if no location found. This is why it's deprecated.