Maybe it would be good to get a suitable error or warning message. In which cases has this happened?
The subfunctions already print these warning messages out, see line 365 and line 296. So there's no need to add another message, only to handle the NoneType correctly.
In case of invalid osm objects,
OSMConnector
returns None, but always expects a validLine
orItinerary
object. This PR should fix this.