Fixed PHP error "Call to a member function implementsInterface() on a non-object"

I got this error when I called "app/console doctrine:generate:form"
Merge pull request #45 from mweimerskirch/patch-1

Fixed "Call to a member function implementsInterface() on a non-object"