Guard from the missing and invalid function params
What you have done is generally the approach I take; however, if these guards are used a lot throughout the application, perhaps you could refactor them into separate functions:

deliveryForCategory(code, category, dateStart, dateEnd) {
    VerifyCode(code);
    VerifyCatergory(category);
    VerifyDate(dateStart);
}


Potentially name it something like ThrowErrorIfCodeInvalid(code) so it's super clear what it does.