Multigraph operators

Force input types to be both graphs or multigraphs.

Fixes #849