Create function to check if value is an element of one of the nested lists in lst