Is `data` just a dict? If so, `user in data` should give you True if `user` is a key in `data`.