Reports safe cast with return that can be replaced with if type check.

Using corresponding functions simplifies your code.

The quick-fix replaces the safe cast with if type check.

Example:


  fun test(x: Any) {
      x as? String ?: return
  }

After the quick-fix is applied:


  fun test(x: Any) {
      if (x !is String) return
  }

Analogously, it detects unsafe casts in form


    fun foo(o: Any) {
    o as String ?: return
}

and transforms into a type check:


    fun foo(o: Any) {
    if (o !is String) return
}