add nil check to toString of PositionImpl