def is_valid_vlan(vlan):
    """Determine whether vlan is valid."""
    try:
        if 0 < int(vlan) < 4095:
            return True
        else:
            return False
    except (ValueError, TypeError):
        return False