yl - raise argument error if input is invalid and add test