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

My attempt at solving issue #1679. Let me know if this has any problems!
done