If you must brake and swerve to avoid a hazard, you should:

If a hazard requires you to brake and swerve to avoid a collision, you should take the actions separately. Do not brake while swerving because doing so may cause your motorcycle to fall over.
DMV Writen Test