Fix cases of nil return nil, and not tostring(nil)