Use json.RawMessage for faster and cheaper JSON checks

This updates `IsJSON` to work with any JSON type, not just objects. Also using a `json.RawMessage` avoids unnecessary allocations and is generally faster.