Support optional parameters in sampling methods