Allowing getReference to detect when the reference does not exist.

If the reference requested does not exist, the $reference variable is NULL which cause the "$this->manager->getClassMetadata(get_class($reference));" line to attempt to get the metadata for Doctrine\Common\DataFixtures\ReferenceRepository (default because $referenceis NULL) rather than the class of the reference object.
This check should be done before reading the reference, using ``isset($this->references[$name])`` instead, to avoid a NOTICE when the reference does not exist