Belive me… somewhere you are reading or writing a null pointer
and probably it is there…
use IsValid()