`OntologyTerm.VisualAttributes.LEAF in it.visualAttributes` would be more idiomatic.