Throw an `error` when the first argument of the constructor is not an object

This should fix issue #126.
Commit b3675ea is not related but i saw that minor issue when i was writing the test and decided to add it.