This should be `@spec slice(t, Range.t) :: t | nil`