def string_or_default(message, default_message):
    """
    Returns a given string, or a default message if the string is empty or invalid
    """
    if (message is None or (not isinstance(message, str)) or len(message) < 1):
        return default_message
    else:
        return message