diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index a850c8a..51ac96c 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -8,7 +8,6 @@
  * API pattern.
  */
 
-use Drupal\Component\Utility\String;
 use Drupal\Core\Language\Language;
 use Symfony\Component\HttpFoundation\Response;
 use Drupal\Core\Cache\CacheBackendInterface;
@@ -20,6 +19,7 @@
 use Drupal\Core\Entity\Display\EntityFormDisplayInterface;
 use Drupal\Core\Template\Attribute;
 use Drupal\file\Entity\File;
+use Drupal\Core\Session\AccountInterface;
 
 /**
  * Denotes that the node is not published.
@@ -1632,15 +1632,15 @@ function node_permissions_get_configured_types() {
  *
  * @param $op
  *   The operation that the user is trying to perform.
- * @param $account
- *   (optional) The user object for the user performing the operation. If
- *   omitted, the current user is used.  Defaults to NULL.
+ * 
+ * @param \Drupal\Core\Session\AccountInterface $account
+ *  The account object for the user performing the operation.
  *
  * @return
  *   An associative array in which the keys are realms, and the values are
  *   arrays of grants for those realms.
  */
-function node_access_grants($op, $account = NULL) {
+function node_access_grants($op, AccountInterface $account) {
 
   if (!isset($account)) {
     $account = \Drupal::currentUser();
@@ -1649,7 +1649,7 @@ function node_access_grants($op, $account = NULL) {
   // Fetch node access grants from other modules.
   $grants = \Drupal::moduleHandler()->invokeAll('node_grants', array($account, $op));
   // Allow modules to alter the assigned grants.
-  drupal_alter('node_grants', $grants, $account, $op);
+  \Drupal::moduleHandler()->alter('node_grants', $grants, $account, $op);
 
   return array_merge(array('all' => array(0)), $grants);
 }
