Some people do something like this:
--If object doesn't exist, create a dummy object
IF OBJECT_ID('dbo.InexistentFunction') IS NULL
EXEC('CREATE FUNCTION InexistentFunction()
RETURNS int
AS
BEGIN
RETURN 0
END')
GO
--Simply alter the object to get the correct definition.
ALTER FUNCTION dbo.InexistentFunction
(
@MyParam int
)
RETURNS date
AS
BEGIN
RETURN DATEADD( dd, @MyParam, GETDATE())
END
GO
--Test
SELECT dbo.InexistentFunction(10)
--Cleanup (just for this example)
DROP FUNCTION InexistentFunction