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