Amniocentesis is mainly done to check for genetic defects in a baby.