older babies bf at night

Baby is 17 mo and still nurses to sleep and in the middle of the night - my ped told me I will rot his teeth this way - has anyone done this and is this true? I'm upset bc I've been doing this for 7 mo of him having teeth!