PreBuild: Rescue from NullReferenceException.