def is_message(message):
    """
    Checks that message has msg data.
    Return (from, to, encoding, message) or None.
    """
    try:
        if message['action'] == 'msg':
            return message['from'], message['to'], message['encoding'
                ], message['message']
    except Exception:
        pass
    return None
