# File die.rb, line 129 def typecast(x) dts = DataTypes.new return nil if x == nil # if nil if @datatype if dts.valid?(@datatype, x) return dts.typecast(@datatype, x) end end return x end