def is_command(oplog):
    """ Check if oplog is a command.
    """
    op = oplog['op']
    # createIndex() could insert a document without _id into *.system.indexes
    if op == 'c' or (op == 'i' and '_id' not in oplog['o']):
        return True
    return False