Get the sort of an Expr.
A getSort<A extends Sort>(Expr value) => currentContext.getSort(value) as A;