Added null check when processing content-type header

Updating the HUD with an AJAX request that has not content-type set causes the following error
 
Uncaught TypeError: Cannot call method 'indexOf' of null 

This is because type is not defined.

This was occurring when a server responded with a HTTP 204 and did not return a content-type header.