Added checks to the create method to check if the factories actually return something

Without the checks, this can lead to weird problems when trying to
create an object.

With these checks, it's immediate clear what is the problem.
Merge pull request #8 from Ikke/add_factory_checks

Added checks to the create method to check if the factories actually return something