Fix NamedEntity::definition to correctly return none