Adds support for passing functions to `assert` and `deprecate`

cc @rwjblue