Baby still drinks formula at 2.5 years old

My toddler still drinks formula at night at 2.5 years old. How can I stop and is it OK?