Cannot read property ‘modelName’ of null
It does this here where denali assumes that relatedRecord may not be null, which is not true.
however I think the fundamental problem is a wrong type definition here, where getRelated may not return null. If we add null there I think typescript would have saved us from that.
Same is true for the adapter here where any seems dangerous.