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

Fixes #1679
Merge pull request #1680 from sarenji/minor

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