<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rpc_get_account_balance(self, address, token_type, **con_info):
 """ Get the balance of an address for a particular token type Returns the value on success Returns 0 if the balance is 0, or if there is no address """

        if not check_account_address(address):
            return {'error': 'Invalid address', 'http_status': 400}

        if not check_token_type(token_type):
            return {'error': 'Invalid token type', 'http_status': 400}

        # must be b58
        if is_c32_address(address):
            address = c32ToB58(address)

        db = get_db_state(self.working_dir)
        account = db.get_account(address, token_type)
        if account is None:
            return self.success_response({'balance': 0})

        balance = db.get_account_balance(account)
        if balance is None:
            balance = 0

        db.close()
        return self.success_response({'balance': balance})