diff --git a/flag_lists.module b/flag_lists.module
--- a/flag_lists.module
+++ b/flag_lists.module
@@ -236,7 +236,7 @@ function flag_lists_flag_link_type_info_alter(&$variables) {
 /**
  * Implements hook_flag_action_access().
  */
-function flag_lists_flag_action_access($action, FlagInterface $flag, AccountInterface $account, EntityInterface $flaggable = NULL) {
+function flag_lists_flag_action_access($action, FlagInterface $flag, AccountInterface $account, ?EntityInterface $flaggable = NULL) {
   // If this is a flag list and we have flag list access,
   // also provide access to the flag.
   // Allow both users flag and the corresponding template.