Use of static valueOf instead of inefficient Number constructor

See https://issues.openmrs.org/browse/GCI-9.