private Annotated check(final PsiModifierListOwner owner, final ProblemsHolder holder, PsiType type) {
    Annotated annotated = Annotated.from(owner);
    PsiAnnotation annotation = annotated.notNull == null ? annotated.nullable : annotated.notNull;
    if (annotation != null && !annotation.isPhysical() && type instanceof PsiPrimitiveType) {
      reportIncorrectLocation(holder, annotation, owner, "inspection.nullable.problems.primitive.type.annotation");
    }
    if (owner instanceof PsiParameter parameter) {
      Nullability expectedNullability = DfaPsiUtil.inferParameterNullability(parameter);
      if (annotated.notNull != null && expectedNullability == Nullability.NULLABLE) {
        reportParameterNullabilityMismatch(parameter, annotated.notNull, holder, "parameter.can.be.null");
      }
      else if (annotated.nullable != null && expectedNullability == Nullability.NOT_NULL) {
        reportParameterNullabilityMismatch(parameter, annotated.nullable, holder, "parameter.is.always.not.null");
      }
    }
    return annotated;
  }
private Annotated check(final PsiModifierListOwner owner, final ProblemsHolder holder, PsiType type)