The M phase checkpoint, or the spindle assembly checkpoint, ensures that chromosomes are properly aligned and attached to the spindle fibers before anaphase begins. This prevents chromosome missegregation, which can lead to aneuploidy, a condition often observed in cancer cells.