You can use Guava's `Iterables.getFirst(elements, null)`, that returns the 1st element, or null if elements is empty. But if you want to leave as is, sounds like good too :)