Use hydrator variable only when hydrator variable is assigned

The hydrator variable is not in use before $this->getHydratorFromName() is called. i just fixed the structure.