[TIMOB-17798]: Add check to prevent crash in future.

Testing steps in JIRA