Check for NULL onSuccess or onFailure handlers, and handle that
condition appropriately.
Tidy.
Add some attributes -- the key can never be nil.