This inspection reports safe cast with 'return' should be replaced with 'if' type check. For example:
fun test(x: Any) {
x as? String ?: return
// Should be replaced with '
if (x !is String) return
' }