input: Write a python function to check the validity of data and return True if valid, otherwise return False.
  assert check_validity("ValidData") == True
  assert check_validity("") == False
  assert check_validity(None) == False
output: def check_validity(data):
      if data and isinstance(data, str):
          return True
      return False