replace readAttr helper with readFact and readNullableFact

it turned out that readAttr lead to rather clunky usage.

minor: fix tests