private static boolean isOfCurrentType(@NotNull PsiInstanceOfExpression expr, PsiType currentType) {
    final PsiTypeElement checkType = expr.getCheckType();
    return checkType != null && checkType.getType().equals(currentType);
  }
private static boolean isOfCurrentType(@NotNull PsiInstanceOfExpression expr, PsiType currentType)