To avoid a hazard, you:

Stopping is not always the best way to avoid a hazard. If there is not enough space for you to stop to avoid coming into contact with the hazard, swerving out of the way may be your safest option.
DMV Writen Test