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.
Change-Id: Id1339dfc14732676316a63d19bd4a16c1412cd41