Validate the module path for require().