Added another utility funciton: `assertMethod`.

See commits for comments.