Update HelperFunctions.php to load node revision if parameter is not an instance of Drupal\node\Entity\Node.