Throw error if the factory being build is not defined.

The current exception is:
     TypeError: Cannot call method 'build' of undefined
which is not very informative.

I tried to run the specs but it was not clear what is the required test environment.
It would be great to extend the package.json like this:

  "scripts": {
    "test": "./node_modules/.bin/mocha"
  },
  "devDependencies": {
    "mocha": "*",
    "mocha-sinon": "*",
    "chai": "*",
    "sinon-chai": "*"
  }

etc. I can help if you tell me how are you running the spec.