use typeof to check if a parameter is set