<div th:if="${currentSkills != null}">
<table>
<tr th:each="skill : ${currentSkills}"><td th:text="${skill.name}"/></tr>
</table>
</div>
<div th:if="${currentSkills == null}">
You don't have any skills
</div>
If currentSkillsthis is a list, you can use a utility #listslike this (which is more correct than the code above, since it also takes into account the possibility when the object is not null but empty):
<div th:if="!${#lists.isEmpty(currentSkills)}">
<table>
<tr th:each="skill : ${currentSkills}"><td th:text="${skill.name}"/></tr>
</table>
</div>
<div th:if="${#lists.isEmpty(currentSkills)}">
You don't have any skills
</div>
You can do the same if currentSkills- this is an array by simply replacing #listswith #arrays.
, isEmpty() true, .