We use a special device called a shutoff value to prevent flooding in our home.