Reorder check expressions

Checks are evaluated from the bottom up, so put the most general checks last