Add assertion for delegate type
Refactor
Update exception type