Revert "Removed valueOf on assignment."

This reverts commit 06a26257f22e806190bf1d6cea8f101303bc3bed.