Using `List#isEmpty` might be more idiomatic.