[Routing] fix url generation for optional parameter having a null value
merged branch Tobion/null-for-optional-param (PR #7369)

This PR was merged into the 2.2 branch.

Commits
-------

d7a7434 [Routing] fix url generation for optional parameter having a null value

Discussion
----------

[Routing] fix url generation for optional parameter having a null value

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes|]
| Fixed tickets | [#7316]
| License       | MIT