function [toHighlight, informerObj, sfInstanceStruct] = SFLibInstanceHighlightingChecks (blockH) 
    
    %Utility function to perfom checks and get coverage data required for highlighting
    
    toHighlight = true;
    informerObj = [];
    sfInstanceStruct = [];

    modelH = get_param(bdroot(blockH),'Handle');
    covColorData = get_param(modelH,'covColorData');
    refBlockH = get_param(get_param(blockH,'ReferenceBlock'),'Handle');

    if isempty(covColorData) || ~isfield(covColorData,'sfLinkInfo') || isempty(covColorData.sfLinkInfo)
        toHighlight = false;
        return;
    end
        
    instanceList = [covColorData.sfLinkInfo.instanceH];
    instIdx = find(instanceList==blockH);
    
    if isempty(instIdx)
        toHighlight = false;
        return;
    end
    
    if length(instIdx)>1
        error(message('Slvnv:simcoverage:cvrefreshsfinstancecov:ErrorCalculating'));
    end
    
    sfInstanceStruct = covColorData.sfLinkInfo(instIdx);
    
    % Use the reference block handle to determine if the library was manually
    % forced closed in which case we must return early
    if (refBlockH ~= sfInstanceStruct.refBlockH)
        toHighlight = false;
        return;
    end
    
    modelCovId = get_param(modelH, 'CoverageId');
    
    if (modelCovId == 0)
        %get modelcovId from one of the cvids we are going to highlight
        %get_param(modelH, 'CoverageId') can be zero if cvmodelview is called
        %after cvload, and model was not loaded before cvload
        modelCovId = cv('get', sfInstanceStruct.cvIds(1), '.modelcov');
    end
    
    %Incase modelCovId is in model reference, get the topModelCovId.
    %Informer object will be associated with topModelCovId.
    topModelCovId = cv('get',modelCovId,'.topModelcovId');
    
    if (topModelCovId > 0)
        informerObj = cvi.Informer.getInstance(topModelCovId);
    else        
        informerObj = cvi.Informer.getInstance(modelCovId);
    end
    if isempty(informerObj)
        toHighlight = false;
    end
end