Improve readability by changing some conditions to one-liners.

This improves the readability of the code and reduces the number of lines.. It is only a cosmetic change..