Can you just ensure that the struct is always created with a non-nil notify member? Conventionally, you wouldn't bother with this check in that case.