obj&.is&.nil? can replace the use of try obj.try(:is).try(:nil?)
obj = nil obj&.gsub("f","g") # => nil obj = "food" obj&.gsub("f","g") # => "good"
obj&.is&.nil? can replace the use of try obj.try(:is).try(:nil?)