Check for bad indices