detect type of a stream based on match on first dataevent