reordered inRange() error checks for logic