Added method to check whether a JSON path is valid