function getMasterState(objMD) {
    if (!objMD) {
        return {};
    }
    const mst = {
        exists: true,
        versionId: objMD.versionId,
        uploadId: objMD.uploadId,
        isNull: objMD.isNull,
        isNull2: objMD.isNull2,
        nullVersionId: objMD.nullVersionId,
        nullUploadId: objMD.nullUploadId,
    };
    if (objMD.location) {
        mst.objLocation = Array.isArray(objMD.location) ?
            objMD.location : [objMD.location];
    }
    return mst;
}
Build the state of the master version from its object metadata

@param {object} objMD - object metadata parsed from JSON

@return {object} state of master version, with the following attributes:
- {boolean} exists - true if the object exists (i.e. if `objMD` is truish)
- {string} versionId - version ID of the master key
- {boolean} isNull - whether the master version is a null version
- {string} nullVersionId - if not a null version, reference to the
  null version ID
- {array} objLocation - array of data locations