Add a check in jwt.encode for data type. Raise an error if it's not a mapping type. It help avoiding typos errors