i would prefer to move the logic into the DependencyInjection class and set a parameter for the assoc type. if burgov is not present, the paremeter would be empty, otherwise its 'burgov_key_value'. then below, you can do 

    if ($this->assocType) {
        return new TypeGuess($this->assocType...) 
    } else {
        return null;
    }