Creating generic registration method for subscribing to NSNotification events.