guard against next[id] as null