private static @Nullable InstanceOfCandidateResult findInstanceOfCandidateResult(@NotNull PsiTypeCastExpression expression) {
    PsiTypeElement castTypeElement = expression.getCastType();
    if (castTypeElement == null) return null;
    PsiExpression operand = expression.getOperand();
    if (operand == null) return null;
    PsiType castType = castTypeElement.getType();
    if (castType instanceof PsiPrimitiveType &&
        !PsiUtil.isAvailable(JavaFeature.PRIMITIVE_TYPES_IN_PATTERNS, operand)) return null;
    PsiType operandType = operand.getType();
    if (operandType == null || castType.isAssignableFrom(operandType)) return null;
    PsiInstanceOfExpression instanceOf = InstanceOfUtils.findPatternCandidate(expression, null);
    return new InstanceOfCandidateResult(castTypeElement, instanceOf);
  }
private static @Nullable InstanceOfCandidateResult findInstanceOfCandidateResult(@NotNull PsiTypeCastExpression expression)