catch TypeError in formatters