Simplifed an if statement

The previous if statement was needlessly verbose.