998317: NPE in refreshpools prevents refreshing pools

We had a scenario where we were not checking an field for
null even though we did 10 lines above. Clearly it was allowed
to be null. I added the appropriate null checks.

Also added exception handling to the RefreshPoolsJob so
that it will gracefully end.