diff --git a/osu.Game/Utils/ModUtils.cs b/osu.Game/Utils/ModUtils.cs
index 9336add465..8ac5bde65a 100644
--- a/osu.Game/Utils/ModUtils.cs
+++ b/osu.Game/Utils/ModUtils.cs
@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
using osu.Game.Rulesets.Mods;
@@ -45,7 +46,7 @@ namespace osu.Game.Utils
/// The combination to check.
/// Any invalid mods in the set.
/// Whether all s in the combination are compatible with each-other.
- public static bool CheckCompatibleSet(IEnumerable combination, out List? invalidMods)
+ public static bool CheckCompatibleSet(IEnumerable combination, [NotNullWhen(false)] out List? invalidMods)
{
combination = FlattenMods(combination).ToArray();
invalidMods = null;