Fixes npm#6861

Check that the `error` property of parsed is not an `object`, which may
be a valid value
'error' in response can be part of response doc

Tests behavior when body response contains either a JSON property named
error of both type string and object. Strings should be treated as
errors and objects should not. Fixes npm/npm#6861.
4.0.5