diff --git a/azurerm/resource_arm_storage_account.go b/azurerm/resource_arm_storage_account.go
index <HASH>..<HASH> 100644
--- a/azurerm/resource_arm_storage_account.go
+++ b/azurerm/resource_arm_storage_account.go
@@ -716,8 +716,9 @@ func flattenAzureRmStorageAccountIdentity(identity *storage.Identity) []interfac
 	}
 
 	result := make(map[string]interface{})
-	result["type"] = *identity.Type
-
+	if identity.Type != nil {
+		result["type"] = *identity.Type
+	}
 	if identity.PrincipalID != nil {
 		result["principal_id"] = *identity.PrincipalID
 	}
Checking identity type is not nill