Allow data to be OrderedDict in addition to dict