You could just pass the count of the parameter to your function and check if it's zero I guess.
pass in Parameters!myParameter.Count
If I have misunderstood let me know and show how you currently call the custom code.
Having said all that if the parameters are required, you should not be able to run the report anyway?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…