title: Checking if a word is an isogram
body: <p>I wrote a program to check if a word is an isogram but after passing the test cases, it says "Your solution failed to pass all the tests" </p>
  
  <p>below is the test cases:</p>
  
  <pre><code>from unittest import TestCase
  
  class IsogramTestCases(TestCase):
    def test_checks_for_isograms(self):
      word = 'abolishment'
      self.assertEqual(
        is_isogram(word),
        (word, True),
         msg="Isogram word, '{}' not detected correctly".format(word)
      )
  
    def test_returns_false_for_nonisograms(self):
      word = 'alphabet'
      self.assertEqual(
        is_isogram(word),
        (word, False),
        msg="Non isogram word, '{}' falsely detected".format(word)
      )
  
    def test_it_only_accepts_strings(self):
      with self.assertRaises(TypeError) as context:
        is_isogram(2)
        self.assertEqual(
          'Argument should be a string',
          context.exception.message,
          'String inputs allowed only'
        )
  </code></pre>
  
  <p>and also below is my code for the tests. it passed the tests but failed some hidden tests:</p>
  
  <pre><code>def is_isogram(word):
  if type(word) == str or len(word) != 0:
      if not word:
          return (word, False)
      word = word.lower()
      return (word, len(set(word)) == len(word))
  else:
      raise TypeError('Argument should be a string')
  </code></pre>
  
  <p>can anybody tell me what I am doing wrong?</p>