Put simplest condition first in if statements

Unless the later parameters are guarding against an invalid state