Number conversion should use valueOf methods