[minor] Use `checkNotNull(ttl, "ttl")` and similarly above?