Shouldn't we check if the repository is of proper class? Otherwise we cannot call methods that we don't know if they even exit.