Change redundant if else statement

Thanks @gregcaporaso!