IDE-1739 Add the null check