
The two helper methods alleviate the need for copious null checks. They also provide consistent behaviour when there are zero elements (i.e. they return null, rather than an empty string or empty array, as was the case before).
The two helper methods alleviate the need for copious null checks. They also provide consistent behaviour when there are zero elements (i.e. they return null, rather than an empty string or empty array, as was the case before).