support the scenario that the first argument is string and the second argument is string or array.