title: Parameterized generics cannot be used with class or instance checks
body: <p>I wrote the code, but I get the following message in pycharm(2019.1):
  "Parameterized generics cannot be used with class or instance checks"</p>
  
  <pre class="lang-py prettyprint-override"><code>    def data_is_valid(data):
          keys_and_types = {
              'comment': (str, type(None)),
              'from_budget': (bool, type(None)),
              'to_member': (int, type(None)),
              'survey_request': (int, type(None)),
          }
  
          def type_is_valid(test_key, test_value):
              return isinstance(test_value, keys_and_types[test_key])
  
          type_is_valid('comment', 3)
  </code></pre>
  
  <p>I really do not understand this message well. Did I do something wrong or is it a bug in pycharm?
  The error disappears if I explicitly typecast to tuple.</p>
  
  <pre class="lang-py prettyprint-override"><code>def type_is_valid(test_key, test_value):
      return isinstance(test_value, tuple(keys_and_types[test_key]))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3ScC9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3ScC9.png" alt="screenshot"></a></p>