How can we check whether block is enabled or disabled in .theme file? I am displaying a block in twig and i am passing twig variable from hook_preprocess_page. But the issue when i disable the block from backend still its showing up in frontend. Im not able to get status of the block. Can anyone help me. Below is my code:

$lang_block = Block::load('dropdownlanguage');
  //if (!empty($lang_block)) {} also i tried.

  if (isset($lang_block)) {
    $content = \Drupal::entityTypeManager()-&gt;getViewBuilder('block')-&gt;view($lang_block);
      $variables['language_block'] = $content;
  } 


In .twig file : 

{%  if language_block %}
   {{ language_block }}
{% endif %}
Use ConfigEntityBase::status:

if (isset($lang_block) &amp;&amp; $lang_block-&gt;status()) {
  // block is enabled
}