<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_app_is_valid(client):
 """ Check to see if the app has valid creds. """

    try:
        if 'refresh_token' in client.creds:
            client.exchange_refresh_token()
        else:
            existing.get_token_info()
        return True
    except TokenEndpointError as e:
        return False