It would probably be better to do the `isset()` check before the initial `stream_query()` call at the beginning of the method since we use it there too.