if (access.length === 0) would be a better check