SQL Safe (sql function)

SQL Server function to clean a field and replace quotes. Returns null if empty string, otherwise a quoted value.