" lastly just a mention of something that came up not so long ago, there is apparently a mention by jcl that certain entity data is still accessible as non empty pointers until they are flushed after a certain process , it was recommended to check entity type along with entity! =null to be really sure ."