adding a null check while reading name from Instances tag

adding a null check while reading name from Instances tag