Remove null params in HttpParams
You should filter them client side using JavaScript's delete
(MDN) keyword if they have a value of undefined
(which is different than the key not being in the object at all):
if (queryObject.secsymb === undefined) {
delete queryObject.secsymb;
}
and then use a default method parameter in your controller method:
GetExposureRunsData(int id, string fund, SecType sectype, string secsymb = null)
If you ensure that the query string parameter is not included then your parameter will default to null