Fix for null adapter case.

- See https://github.com/zendframework/zf2/issues/5074 

Change-Id: If6bb392566a166d60879bbb836b6e4b77fc7a7aa