Update Canonicalizer.php

null !== ''

Checking for null is used in particular in the validation
Update Canonicalizer.php

Fixed return value
Merge pull request #1083 from vlastv/patch-1

Update Canonicalizer.php