getIndexById() should return null on negative index