typing: refactor type adaptations in AEqExpr and ANeExpr