Fixing an issue formatting url fields with undefined values