It appears that traits sometimes does not have a title. Please update the code to use the trait's codedName if title is missing.
title
codedName
Trait data error in texcoco-w instance, see image.