I think this case is missing from your test suite.  You should definitely test it, because you'll end up passing a string to `log_event` which, if tracking is enabled, will then treat it like a `dict`.  I'm guessing this will cause a `TypeError` of some kind.  It's probably better to just return immediately and skip the log step altogether, perhaps logging a debug message to the console using `logging`