Control link parameter to accept null case

kindly need your support regarding below point
(adding default value (Null) to filters in query report)
I am developing query reports in Frappe with link parameters Ex. #test= %(p_test)s;# which showing list of values from another DocType, my question is there any work-around to make the parameter accept null in case user want to retrieve all data like we did in sql
where (test=p_test or p_test is null)