 
   call: (key, args) ->
     closure = @get_raw(key)
-    assert isFunction(closure), "#{key}: #{closure} is not a function"
+    assert _.isFunction(closure), "#{key}: #{closure} is not a function"
     closure(@, args)
     
   # TODO: refactor import_dict methods somewhere
   _import_children: (array) ->
     result = @rx().array()
+    assert _.isArray(array), "_import_children: #{array} is not an array"
     for value in array
       assert value, 'import child'
       result.push @make_world(value)


  make_world: (value) ->
    return value if @is_world(value)
    return @_from_dict(value) if isObject(value)
    @_from_value value
    
  _children: -> @get(CHILDREN)

    new World(authority or @, label)
    
  _from_value: (value) ->
    assert _.isString(value), "_from_value requires string"
    world = @_spawn_world "#{value}"
    world.put("value", value)
    world
