Design a Python function to check if two given strings are anagrams or not.
"abc", "cab"
def check_anagram(str1, str2):
 
    if sorted(str1) == sorted(str2):
        return True
    else:
        return False