valueOf to support lossy primitive operations