Basically the same code with an if statement in Mock

I don't think we were falling off the end of the List. After reading around I don't think this can happen. I think we've got a null record somewhere so hopefully my changes will stop that record(s) getting into the list