The below snippet of code is giving me the following error:

Runtime Error: 'Equity' object has no attribute 'symbol'
  at ManageRisk
    if not security.Invested and security.symbol['SPY']:

I know its because I am not exempting the SPY properly within a kvp list.  How would I go about exempting specific equities from this sample risk management model?

The trailing Stop code:

#region imports
from AlgorithmImports import *
from main import *
from QuantConnect.Algorithm.Framework.Risk import RiskManagementModel

# bracket risk model class
class BracketRiskModel(RiskManagementModel):
    '''Creates a trailing stop loss for the maximumDrawdownPercent value and a profit taker for the maximumUnrealizedProfitPercent value'''
    def __init__(self,maximumDrawdownPercent = 0.1, maximumUnrealizedProfitPercent = 0.1):
        #it was maximumDrawdownPercent maximumUnrealizedProfitPercent  .05
        self.maximumDrawdownPercent = -abs(maximumDrawdownPercent)
        self.trailingHighs = dict()
        self.maximumUnrealizedProfitPercent = abs(maximumUnrealizedProfitPercent)

    def ManageRisk(self, algorithm, targets):
        riskAdjustedTargets = list()
        for kvp in algorithm.Securities:
            symbol = kvp.Key
            security = kvp.Value

            # Remove if not invested
            #THIS IS WHERE ITS ERRORING. What is the correct way to have this ignore a specific security, in this case the SPY?
            if not security.Invested and security.symbol['SPY']:
                self.trailingHighs.pop(symbol, None)
            pnl = security.Holdings.UnrealizedProfitPercent
            if pnl > self.maximumUnrealizedProfitPercent:
                # liquidate
                algorithm.Debug(f"Profit Taken: {security.Symbol}")
                algorithm.Log(f"Profit Taken: {security.Symbol}")
                riskAdjustedTargets.append(PortfolioTarget(security.Symbol, 0))
                return riskAdjustedTargets
            # Add newly invested securities
            if symbol not in self.trailingHighs:
                self.trailingHighs[symbol] = security.Holdings.AveragePrice   # Set to average holding cost

            # Check for new highs and update - set to tradebar high
            if self.trailingHighs[symbol] < security.High:
                self.trailingHighs[symbol] = security.High

            # Check for securities past the drawdown limit
            securityHigh = self.trailingHighs[symbol]
            drawdown = (security.Low / securityHigh) - 1

            if drawdown < self.maximumDrawdownPercent:
                # liquidate
                algorithm.Debug(f"Losses Taken: {security.Symbol}")
                algorithm.Log(f"Losses Taken: {security.Symbol}")
                riskAdjustedTargets.append(PortfolioTarget(symbol, 0))
        return riskAdjustedTargets