We can retain the check and use a primitive via the return value from checkNotNull:

```
long length = checkNotNull(payload.getContentMetadata().getContentLength(),
             "please invoke payload.getContentMetadata().setContentLength(length) prior to azure block upload");
```