diff --git a/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs b/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
index 78506e6ba6..d6d3453a26 100644
--- a/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
+++ b/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs
@@ -277,7 +277,7 @@ namespace Umbraco.Cms.Core.Models.Mapping
},
};
- if (_backofficeSecurityAccessor.BackOfficeSecurity.CurrentUser.HasAccessToSensitiveData() is false)
+ if (_backofficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.HasAccessToSensitiveData() is false)
{
// Current user doesn't have access to sensitive data so explicitly set the views and remove the value from sensitive data
foreach (var property in properties)
diff --git a/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs
index ea77708c8c..5a0088c727 100644
--- a/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs
+++ b/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs
@@ -412,7 +412,7 @@ namespace Umbraco.Extensions
/// The nested sql query.
/// An optional alias for the joined table.
/// A SqlJoin statement.
- public static Sql.SqlJoinClause InnerJoin(this Sql sql, Sql nestedSelect, string alias = null)
+ public static Sql.SqlJoinClause InnerJoin(this Sql sql, Sql nestedSelect, string? alias = null)
{
var join = $"({nestedSelect.SQL})";
if (alias is not null)
@@ -462,7 +462,7 @@ namespace Umbraco.Extensions
/// The nested sql query.
/// An optional alias for the joined table.
/// A SqlJoin statement.
- public static Sql.SqlJoinClause LeftJoin(this Sql sql, Sql nestedSelect, string alias = null)
+ public static Sql.SqlJoinClause LeftJoin(this Sql sql, Sql nestedSelect, string? alias = null)
{
var join = $"({nestedSelect.SQL})";
if (alias is not null)