Add a NotificationCommand object defined type, refs#7214

If `$env` defaults to an empty hash, you can drop the `if` conditional.