Mandy Moore’s dog ate a tennis ball and almost died