It looks like you need something like:

CopyIF EXISTS(SELECT TU.Tagged 
          FROM TopicUser TU 
          WHERE TU.TopicId = @TopicId 
               AND TU.UserId = @UserId 
               AND TU.Tagged IS NOT NULL)
BEGIN
    --do stuff

END

Otherwise, you're checking only if records meeting your criteria exist, but those records could have a NULL value in the TU.Tagged column.

Answer from Andrey Korneyev on Stack Overflow
🌐
W3Schools
w3schools.com › sql › sql_null_values.asp
SQL NULL Values - IS NULL and IS NOT NULL
The IS NULL operator is used to test for empty values (NULL values). The following SQL lists all customers with a NULL value in the "Address" field:
🌐
ThoughtSpot
thoughtspot.com › sql-tutorial › sql-is-null
SQL IS NULL | Basic SQL | ThoughtSpot
March 12, 2026 - This SQL tutorial covers how to work with null values by using SQL's IS NULL operator to select rows where a column contains no data.
Discussions

Check if a column's value is null in SQL Server - Stack Overflow
Can't believe I am stuck with this but how can I check that value I am returning is null in select statement IF EXISTS(SELECT TU.Tagged FROM TopicUser TU WHERE TU.TopicId = @TopicId and... More on stackoverflow.com
🌐 stackoverflow.com
Why doesn't SQL support "= null" instead of "is null"? - Stack Overflow
I'm not asking if it does. I know that it doesn't. I'm curious as to the reason. I've read support docs such as as this one on Working With Nulls in MySQL but they don't really give any reason. ... More on stackoverflow.com
🌐 stackoverflow.com
IS NULL vs =NULL - SQLTeam.com Forums
How can the below return different things · NULL is an unknown value and therefore a NULL value can never be equal to another value, even if that other value is NULL. NULL = NULL is unknown and cannot be true - eliminating that row from the results · Please the see following links for the ... More on forums.sqlteam.com
🌐 forums.sqlteam.com
0
June 15, 2022
SQL is null and = null - Stack Overflow
Possible Duplicate: what is “=null” and “ IS NULL” Is there any difference between IS NULL and =NULL What is the difference between where x is null and where x = nu... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › queries › is-null-transact-sql
IS NULL (Transact-SQL) - SQL Server | Microsoft Learn
To determine whether an expression is NULL, use IS NULL or IS NOT NULL instead of comparison operators (such as = or !=). Comparison operators return UNKNOWN when either or both arguments are NULL.
🌐
Hightouch
hightouch.com › sql-dictionary › sql-is-null
SQL IS NULL - Syntax, Use Cases, and Examples | Hightouch
December 29, 2023 - A NULL value in a database represents the absence of data, and the IS NULL operator is used to identify and select rows that contain NULL values in a particular column. You would use the SQL IS NULL operator when you need to filter data from ...
🌐
W3Schools
w3schools.com › sql › sql_isnull.asp
W3Schools.com
The "InOrder" column is optional, and may contain NULL values. ... Note: In the SQL above, if any of the "InOrder" values are NULL, the result will be NULL!
🌐
GeeksforGeeks
geeksforgeeks.org › sql › sql-is-null-operator
SQL IS NULL Operator - GeeksforGeeks
April 16, 2026 - The SQL IS NULL operator checks whether a column contains a NULL (missing or unknown) value.
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › language-elements › null-and-unknown-transact-sql
NULL and UNKNOWN (Transact-SQL) - SQL Server | Microsoft Learn
Applies to: SQL Server Azure SQL ... Fabric Warehouse in Microsoft Fabric SQL database in Microsoft Fabric · NULL indicates that the value is unknown....
🌐
Devart
devart.com › home › how to › how to handle null or empty values in sql server
Null vs. Empty Values in SQL Server — Queries and Techniques
December 19, 2024 - This article explores the differences between NULLs and empty values in SQL Server and discusses how to handle them effectively. ... NULL represents missing or unknown data in a database column. This can occur in two scenarios: when the data ...
🌐
Oracle
docs.oracle.com › en › database › other-databases › nosql-database › 25.3 › sqlreferencefornosql › is-null-and-is-not-null-operators.html
IS NULL and IS NOT NULL Operators
February 6, 2026 - The IS NULL operator tests whether the result of its input expression is NULL. If the input expression returns more than one item, an error is raised. If the result of the input expression is empty, IS NULL returns false. Otherwise, IS NULL returns true if and only if the single item computed ...
🌐
Mode
mode.com › sql-tutorial › sql-is-null › index.html
SQL IS NULL | Basic SQL - Mode
May 23, 2016 - Some tables contain cells with no data in them. These are known as null values. You can use SQL's IS NULL operator to select rows that have no data in a given column.
🌐
W3Schools
w3schools.com › sql › sql_aggregate_functions.asp
SQL Aggregate Functions
String Functions: ASCII CHAR_LENGTH ... CASE CAST COALESCE CONNECTION_ID CONV CONVERT CURRENT_USER DATABASE IF IFNULL ISNULL LAST_INSERT_ID NULLIF SESSION_USER SYSTEM_USER USER VERSION SQL Server Functions...
🌐
GeeksforGeeks
geeksforgeeks.org › sql › isnull-function-in-sql-server
SQL Server ISNULL() Function - GeeksforGeeks
July 23, 2025 - Explanation: In the query SELECT ISNULL('gfg', 'Geeks');, since the first argument 'gfg' is not NULL, the function returns 'gfg' without using the replacement value 'Geeks'. Write a query to replace a NULL value with a specified string in SQL Server.
🌐
SQL Skull
sqlskull.com › home › sql is null
SQL IS NULL - SQL BI Tutorials
January 13, 2021 - SQL Server Tutorials By Pradeep Raturi : The IS NULL is used in SQL to find a NULL value. It returns TRUE if a NULL value is found, otherwise it returns FALSE.
🌐
Quora
quora.com › What-is-the-difference-between-“is-null”-and-“-null”-in-SQL
What is the difference between “is null” and “= null” in SQL? - Quora
Answer (1 of 10): It's important to note, that NULL doesn't equal NULL. [code ]NULL[/code] is not a value, and therefore cannot be compared to another value. [code ]where x is null[/code] checks whether x is a null value. [code ]where x = null[/code] is checking whether x equals NULL, which wi...
🌐
SQLTeam
forums.sqlteam.com › t › is-null-vs-null › 21223
IS NULL vs =NULL - SQLTeam.com Forums
June 15, 2022 - How can the below return different things · NULL is an unknown value and therefore a NULL value can never be equal to another value, even if that other value is NULL. NULL = NULL is unknown and cannot be true - eliminating that row from the ...