fail-fast when header is not a string

Part of fixing: http://manage.dimagi.com/default.asp?84153#484866