Throw an error when bindings aren't an obj or func

Fixes #1679