Fix order sorting to prevent incorrect order number generation.

See https://github.com/Sylius/Sylius/pull/631
Merge pull request #843 from Richtermeister/fix-order-numbers

Fix order sorting to mitigate incorrect order number generation.
Added a check for null values, they need to be set to IS null, not equals null
Merge pull request #845 from isometriks/master

[ResourceBundle] Proper handling of null values