function idSequencer(_currMax, userPassedId) {
    let currMax = _currMax;
    let newMax;
    let newId;

    if (currMax === undefined) {
        currMax = -1;
    }

    if (userPassedId === undefined) {
        newMax = currMax + 1;
        newId = newMax;
    } else {
        newMax = Math.max(currMax + 1, userPassedId);
        newId = userPassedId;
    }

    return [
        newMax, // new max id
        newId, // id to use for row creation
    ];
}
@private
@param {*} _currMax - the current max id
@param {*} userPassedId - the new id passed to the create action

Both may be undefined. The current max id in the case that this is the first Model
being created, and the new id if the id was not explicitly passed to the
database.

@return {Array} the new max id and the id to use to create the new row

If the id's are strings, the id must be passed explicitly every time.
In this case, the current max id will remain `NaN` due to `Math.max`, but that's fine.