Simplify error assertions