check string length, not dict length

`_apns_send` wasn't properly checking the length of the payload. I think this fixes it. I added a test for this that fails with the change, but succeeds with the change.