Only detect real JSON parsing errors

As of 1.0 the `/index/type/_mapping` endpoint can return `{}` which is both `empty` but also valid. This change ensures that only real JSON parsing errors trigger the fallback behaviour.

Fixes #586