private static boolean isNullableQualifier(GrExpression qualifier) {
    GrExpression newQualifier = qualifier;
    while (newQualifier != null) {
      GrReferenceExpression innerRefExpr = getReferenceExpression(newQualifier);
      if (innerRefExpr == null) {
        return false;
      }
      IElementType dotToken = innerRefExpr.getDotTokenType();
      if (GroovyTokenTypes.mOPTIONAL_CHAIN_DOT.equals(dotToken)) {
        return false;
      } else {
        newQualifier = innerRefExpr.getQualifier();
      }
    }
    GrReferenceExpression topRefExpr = getReferenceExpression(qualifier);
    if (topRefExpr == null) {
      return false;
    }
    if (GroovyTokenTypes.mOPTIONAL_DOT.equals(topRefExpr.getDotTokenType())) {
      return true;
    }
    return false;
  }
private static boolean isNullableQualifier(GrExpression qualifier)