Throw an InvalidArgumentException if target is not provided