Check for null ContentType before dereferencing