I'd use `containsKey(id)` in preference