Couldn't you simply do this?
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[isuniqueidentifier]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[isuniqueidentifier]
GO
CREATE FUNCTION dbo.isuniqueidentifier (@unique varchar(100))
RETURNS bit AS
BEGIN...