Use schema to check if path is a reference