Fixed NullReferenceException in identifier check