A simple function who can help you to know if an object path is valid