Fix type error when coercing to JSON.