Use path.valid, rather than Path.isValid