How to avoid the comparison trap