Don’t cache references when id is undefined/null