checks for parent injector before trying to call Injector#resolve method of it.