Fixes crash when completion handler is nil.