Rather than returning an *empty* Object[1] we should be returning `null` instead, since that's consistent with existing API-functionality. To avoid having to *manually* track if the Object is empty, this patch also introduces a small helper function to check its size.