function cursorPositionsEqual(a, b) {
  if (!a && !b) {
    return true;
  } else if (a && b) {
    return a.toString() == b.toString();
  }
  // Only one cursor position is an object, can't be equal.
  return false;
}
Compares two cursor positions and returns whether they are equal.
@param {UndoRedo.CursorPosition_} a A cursor position.
@param {UndoRedo.CursorPosition_} b A cursor position.
@return {boolean} Whether the positions are equal.