input: Write a python function to check if a given string is a valid identifier.
  assert isValidIdentifier("variable1") == True
  assert isValidIdentifier("1variable") == False
  assert isValidIdentifier("_variable") == True
  assert isValidIdentifier("var_iable") == True
  assert isValidIdentifier("variable!") == False
output: def isValidIdentifier(s: str) -> bool:
      if not s:
          return False
      if not (s[0].isalpha() or s[0] == '_'):
          return False
      for char in s[1:]:
          if not (char.isalnum() or char == '_'):
              return False
      return True