Add ToDouble method.