function isFirst (doc, containerPath, coor) {
  if (coor.isNodeCoordinate()) {
    return coor.offset === 0
  }
  const node = getContainerRoot(doc, containerPath, coor.path[0])
  if (node.isText()) {
    return coor.offset === 0
  }
  if (node.isList()) {
    const itemId = coor.path[0]
    return (node.items[0] === itemId && coor.offset === 0)
  }
  return false
}
Helper to check if a coordinate is the first position of a node.
Attention: this works only for Text and List nodes