Given two strings s and t, create a new Python function to check if s is an anagram of t.
s = "anagram"
t = "nagaram"
def is_anagram(s, t):
 s_list = list(s)
 t_list = list(t)
 s_list.sort()
 t_list.sort()
 if s_list == t_list:
 return True
 else:
 return False