BUG: Fix exception when comparing Event to object with no __dict__.

In particular don't throw an exception on comparison to `None`.
ENH: A TradingAlgorithm method called before each trading day
MAINT: Use local variable with same value