Do we need a `checkArgument` on the input here, or do we know that it will be a set? And should that be `checkNotNull(input, "input")`?