Use isSetUrl() method instead of getter with != null check because if the Url is not null but empty, the feature is not encoded and the href attribute content is empty.