json_type(data, '$.name') IS 'text'
A CHECK constraint only fails when the expression is false, NULL counts as passing.