Don't detach finalizer if it is NULL