Make sure data is always a dict