A common example is that socket objects will randomly become None after SIGTERM has been caught and during cleanup, causing our code to throw null pointers.
I've been putting up if sock=None guards all over the place in the code. This is clearly a stopgap.. should try and figure out what's going on. Could take a long time to figure out