Improve readability by changing some conditions to one-liners.