deal with empty params, add 'null' and replace with '' in the script