Substitute param with optional variable.