Whenever a determination of value is necessary to assess the class of an offense in this code or the level of punishment, the determination of value shall be made by the trier of fact beyond a reasonable doubt.