def get_status_message(status):
    """Returns the message of the given Mesos task status, possibly None

    :param status: The task status
    :type status: :class:`mesos_pb2.TaskStatus`
    :returns: The task status message
    :rtype: string
    """

    if hasattr(status, 'message'):
        return status.message

    return None