Do not assume CONTENT_TYPE is available, fall back to CakeResponse::type()

Not all servers will provide a CONTENT_TYPE environment variable.

In such a situation, the user is required to decode POST data explicitly with CakeRequest::input().

This patch falls back to CakeResponse::type() to determine the content type when the existing check provides null.