only downcase header keys if they are strings