Fixed NullReferenceException due to SqlTranslationWriter not always being available