How can I check if a variable is defined in Thymeleaf?
Something like this in Javascript:
if (typeof variable !== \
You can use conditional operators. This will write variable if exists or empty string: