public static boolean hasType(@Nullable PsiExpression expression, @NonNls @NotNull String typeName) {
    if (expression == null) {
      return false;
    }
    if (typeName.equals(JAVA_LANG_STRING)) {
      if (expression instanceof PsiUnaryExpression || expression instanceof PsiInstanceOfExpression ||
          expression instanceof PsiFunctionalExpression) {
        return false;
      }
      if (expression instanceof PsiPolyadicExpression poly) {
        IElementType tokenType = poly.getOperationTokenType();
        if (!tokenType.equals(JavaTokenType.PLUS)) return false;
      }
    }
    final PsiType type = expression.getType();
    return TypeUtils.typeEquals(typeName, type);
  }
public static boolean hasType(@Nullable PsiExpression expression, @NonNls @NotNull String typeName)