catch TypeError in formatter