diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs
index 0fc3bac044..32eec7f284 100644
--- a/src/Umbraco.Core/Models/ContentBase.cs
+++ b/src/Umbraco.Core/Models/ContentBase.cs
@@ -264,7 +264,7 @@ namespace Umbraco.Core.Models
/// Value as an
public virtual object GetValue(string propertyTypeAlias)
{
- return Properties[propertyTypeAlias].Value;
+ return Properties.Contains(propertyTypeAlias) ? Properties[propertyTypeAlias].Value : null;
}
///
@@ -275,8 +275,13 @@ namespace Umbraco.Core.Models
/// Value as a
public virtual TPassType GetValue(string propertyTypeAlias)
{
+ if (Properties.Contains(propertyTypeAlias) == false)
+ {
+ return default(TPassType);
+ }
+
var convertAttempt = Properties[propertyTypeAlias].Value.TryConvertTo();
- return convertAttempt.Success ? convertAttempt.Result : default(TPassType);
+ return convertAttempt.Success ? convertAttempt.Result : default(TPassType);
}
///