By checking that the node is empty, I think you mean that it does not have a child (text or node).
Checking for the presence of node only space values can be performed using the function normalize-space().
I suggest you use this condition:, not(./*) and normalize-space(.)=""i.e.