update param to handle undefined and null values