Use of static valueOf instead of inefficient Number constructor