You can combine these two conditions to avoid an extra level of indentation.