Modified return annotation further.

- Per @mtdowling, changed from `resource` to `resource|null`. Since the
  implementation does not need to wrap an actual stream, just something that can
  act like one, `detach()` will be undefined for cases where a stream is not
  wrapped.