def is_valid_mask(mask):
    """
    Validates a UNIX style permissions mask.  Mask must be octal.

    :type mask: str
    :param mask: The octal mask to be validated.  For example: '0755'.

    :rtype: bool
    :return: True or False depending on whether mask passes validation.
    """
    if mask is None:
        return False
    if not mask.isdigit():
        return False
    if len(mask) != 4:
        return False
    mask_values = ['0', '1', '2', '4', '5', '6', '7']
    if mask[0] != '0':
        return False
    for value in mask[1:]:
        if value not in mask_values:
            return False
    return True
