Simplify two conditions

Just while writing codes… :-).