def METHOD_NAME(self, path):
    if self.rootPath is None:
        projectPath = pathlib.Path(path)
        if not projectPath.is_absolute():
            projectPath = "/" / projectPath
    else:
        projectPath = self.rootPath.joinpath(*path.split("/"))
    if projectPath.suffix.lower() in fileExtensions and projectPath.exists():
        return projectPath
    return None