fix totalizer animation, add some var typeof check