<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_channel_state_for_update( self, channel_identifier: ChannelID, closer: Address, update_nonce: Nonce, block_identifier: BlockSpecification, ) -> Optional[str]: """Check the channel state on chain to see if it has been updated. Compare the nonce, we are about to update the contract with, with the updated nonce in the onchain state and, if it's the same, return a message with which the caller should raise a RaidenRecoverableError. If all is okay return None. """

        msg = None
        closer_details = self._detail_participant(
            channel_identifier=channel_identifier,
            participant=closer,
            partner=self.node_address,
            block_identifier=block_identifier,
        )
        if closer_details.nonce == update_nonce:
            msg = (
                'updateNonClosingBalanceProof transaction has already '
                'been mined and updated the channel succesfully.'
            )

        return msg