STREAMS-157 | Modified the way IDs are set so that we are more tolerant ...

...to null values, which can be necessary