The above line handles old mongo's odd storage of definition.data as either a string or a dict depending on whether 'data' was the only content field and was of type String.