Fix #1364 - Avoid creating link elements in case of invalid value