Agreed, but problem is that this NPE is intermittent and I could not find out what is the cause of it.
if you have better solution I would be more than happy with it. I don't like this quick fix at all.
With this fix we get our testsuite more predictably passing.