check if path isset before using it