Ensuring Path.get() returns undefined when missing