We need a special method for most of the cases to avoid + undefined on Nil.
Based on the type of the internal object, It should return its default value.
1. String - empty string or ""
name = nil
(name.new_method) should return empty
when i use for concatenating name with any other variable, I can avoid throwing exception.
2. Integer: 0
3. float: 0.0
this really helps avoiding lot of job failures due to Nil, like + is undefined on nil class.
Send us a ticket, we will try our best to assist you with your problem