guard against UnboundLocalError in `/review/<id>`