Made it possible to get an object or an array of objects from the method passed to the constructor.