handleNodeWithTeam is meant to invoke its callback with the "type"