Should always return null when the list is empty

* Fix firstItemId() and lastItemId() accordingly