title: Having problem while overriding admin custom content type edit form
body: <p>I am facing a very strange problem while trying to override a custom content type edit form template in my custom theme.</p>
  <p>I have a custom theme <code>mysite_admin</code> (sub-theme of <code>seven</code>) with a minimal setup. It has mandatory <code>mysite_admin.info.yml</code> and <code>mysite_admin.theme</code> file. I created a content type named <code>Very Basic Content Type</code> for demonstration purposes. Now I want to <code>preprocess</code> the edit form for said content type so I create a following function in <code>mysite_admin.theme</code> file</p>
  <pre><code>function mysite_admin_preprocess_form__node_very_basic_content_type_form(&amp;$variables) {
      ksm($variables);
  }
  </code></pre>
  <p>flush cashes, and instead of seeing the variables output on top of my edit form I see an exception as follows</p>
  <pre><code>The website encountered an unexpected error. Please try again later.
  TypeError: Argument 1 passed to Drupal\Core\Render\Element::setAttributes() must be of the type array, null given, called in /home/ejaz/sites/mysite/core/includes/form.inc on line 362 in Drupal\Core\Render\Element::setAttributes() (line 173 of core/lib/Drupal/Core/Render/Element.php).
  
  Drupal\Core\Render\Element::setAttributes() (Line: 362)
  template_preprocess_form() (Line: 287)
  Drupal\Core\Theme\ThemeManager-&gt;render() (Line: 431)
  Drupal\Core\Render\Renderer-&gt;doRender() (Line: 200)
  Drupal\Core\Render\Renderer-&gt;render() (Line: 226)
  Drupal\Core\Render\MainContent\HtmlRenderer-&gt;Drupal\Core\Render\MainContent\{closure}() (Line: 573)
  Drupal\Core\Render\Renderer-&gt;executeInRenderContext() (Line: 227)
  Drupal\Core\Render\MainContent\HtmlRenderer-&gt;prepare() (Line: 117)
  Drupal\Core\Render\MainContent\HtmlRenderer-&gt;renderResponse() (Line: 90)
  Drupal\Core\EventSubscriber\MainContentViewSubscriber-&gt;onViewRenderArray()
  call_user_func() (Line: 111)
  Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher-&gt;dispatch() (Line: 156)
  Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw() (Line: 68)
  Symfony\Component\HttpKernel\HttpKernel-&gt;handle() (Line: 57)
  Drupal\Core\StackMiddleware\Session-&gt;handle() (Line: 47)
  Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle() (Line: 106)
  Drupal\page_cache\StackMiddleware\PageCache-&gt;pass() (Line: 85)
  Drupal\page_cache\StackMiddleware\PageCache-&gt;handle() (Line: 47)
  Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle() (Line: 52)
  Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle() (Line: 23)
  Stack\StackedHttpKernel-&gt;handle() (Line: 694)
  Drupal\Core\DrupalKernel-&gt;handle() (Line: 19)
  </code></pre>
  <p>I see the same exception if I create a template named <code>form--node-very-basic-content-type-form.html.twig</code> in my custom theme's <code>templates</code> directory while <strong>not</strong> having said preprocess function in theme file.</p>
  <p>Wagwan?</p>