KeyNotFoundException vs returning null in Kotlin
hope this fix your issue In Kotlin, you have decent null handling. So
opposed to java, no need to avoid null, you can embrace it.So i would
choose your second option and let the consumer of your Api decide themself.
Date : December 26 2020, 12:01 AM , By : Marcos de Carvalho