IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SomeTable$Some Doc]') AND TYPE IN (N'U')) UPDATE[SomeTable$Some Doc] SET ...
IF EXISTS (SELECT 1 FROM SomeTable WHERE Name = 'somename')