Guard against null pointer in client GC free callback