Add type testing in update Stats