Make TextConfig hash/equal'able

Also assert the effect and format are not null.