null handling for unregister