Use simpler way to check if path is empty.