Match the spec properly

Fixes #1 and #2.
Speed up the “is object” check in case of `null` or `undefined`
Merge pull request #3 from mathiasbynens/spec

Match the spec properly: throw when not an object; make getter generic.