PsiType (@Nullable PsiType argType, @NotNull PsiManager psiManager, @NotNull GlobalSearchScope resolveScope) { if (argType instanceof PsiDisjunctionType) { argType = ((PsiDisjunctionType)argType).getLeastUpperBound(); } else if (argType instanceof PsiWildcardType) { argType = ((PsiWildcardType)argType).getBound(); } if (argType == null || PsiTypes.nullType().equals(argType) || LambdaUtil.notInferredType(argType)) { argType = PsiType.getJavaLangObject(psiManager, resolveScope); } return argType; }