Add isinstance to the donuts(count) function