Currently I am doing the following, but I am sure there must be a better way:
def birthday_defined?(map)
map && map[:extra] && map[:extra][:raw_info] && map[:extra][:raw_info][:birthday]
end
There may be cases where only map[:extra]
is defined, and then I will end up getting Nil exception errors cause map[:extra][:raw_info]
doesn't exist if I dont use my checked code above.