The lambda expression in the runCatching method is required to return something of generic/variable type R (see definition of runCatching), but you’re returning something of type Nothing? instead, as the Kotlin plugin believes s can only be null at the return statement (it is smartcast to Nothing?).
Sorry, I was on vacation. Thanks for the report, I don’t think it is a duplicate, since in this case we just have a redundant error diagnostic, but no exceptions. Created https://youtrack.jetbrains.com/issue/KT-33901.