Is there a design pattern to remove the need to check for flags ...

Is there a design pattern to remove the need to check for flags ...