<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _IsBase64(cls, s):
 """An imperfect but decent method for determining if a string is base64. Args: s: A string with the data to test. Returns: True if s is base64, else False. """

    try:
      if base64.b64encode(base64.b64decode(s)).decode('utf-8') == s:
        return True
    except (TypeError, binascii.Error):
      pass
    return False