Fix potential NPE in ItemList.