Change error condition of ToDouble()&ToFloat()