Callback called only when element is not empty
Adding callback for individual path segments