Convert dict to object before formatting

- According to this discussion, https://discuss.frappe.io/t/print-format-currency-utils/3480/3
Safe check for dict
Merge pull request #891 from nathando/patch-4

Convert dict to object before formatting