DataSender: Add type hint and remove needless count() operation
Rather than counting the number of items and determining whether
the result is zero, check only if the array has 'any' items,
which is achieved with a boolean check.
Also, the previous code (in theory) allowed $documenets to
be null, and still correctly "do nothing" because of legacy
tolerance inside count().
Rather than starting to fail in a confusing way for that use case,
add a type-hint to make sure any such code is explicitly detected.
For the record, I could not find any such code. Merely defensive.