Added `containsItem` for improved efficiency on primitives.