Consolidate to one 'if' condition