Assure the object has the specified child dict

def assure_obj_child_dict(obj, var):
  """Assure the object has the specified child dict
  """
  if not var in obj or type(obj[var]) != type({}):
    obj[var] = {}
  return obj