added null ref check on CanonicalUrl extension