[IOT-1849] fixed null subject ID comparison logic