Added condition to check if the param is not empty