Protecting objects with Object.freeze