private static boolean hasUnconditionalPatternCheck(PsiType type, PsiExpression check) {
    final PsiCaseLabelElement pattern = SwitchUtils.createPatternFromExpression(check);
    if (pattern == null) return false;
    return JavaPsiPatternUtil.isUnconditionalForType(pattern, type);
  }
private static boolean hasUnconditionalPatternCheck(PsiType type, PsiExpression check)