pub fn check_expression_invariants(expr: &TLExpr) -> bool
Check invariants for an expression.
Returns true if all invariants hold.