[bugfix] Prevent a crash when SNI got destroyed

The crash happens when a Node that have a null CacheEntry
got destroyed. If this happens, the destructor will still
check if we should deref and clear the null CacheEntry, and
will crash.

Now, the check is only made when the CacheEntry is not null.