def METHOD_NAME(value, name):
    """Checks that value is either unspecified, or a valid integer.
    Otherwise raises InvalidArgument.
    """
    if value is None:
        return
    check_type(int, value, name)