simplified logic of isIndexed() and isMapped()