title: find common unique elements of lists and returning None if empty list
body: <p>Why the last part of my code doesn't work?</p>
  
  <pre><code>def common_elements(list1, list2):
  
  
      #a list with common element
      common_elements=[]
      common_unique_elements=[]
  
      for i in list1:
          if i in list2:
              common_elements.append(i)
      #removing repeated elements
              for i in common_elements:
                  if i not in common_unique_elements:
                      common_unique_elements.append(i)
      #returning None for empty list                
                      if len(common_elements)==0:
                          return None
      return sorted(common_unique_elements)
  </code></pre>