[SLP]Check if the value has uselist before asking for uses

Need to check if the value has uselist before asking for uses to fix
a compiler crash

Fixes #173569

GitOrigin-RevId: 30c6bbe8d3650a061909fb58085416f2411aa123
2 files changed