```typescript
/** A mapping's value for a key, or a fallback when it is absent. */
export function lookUp(
  store: Record<string, string>,
  key: string,
  fallback: string,
): string {
  if (typeof store[key] !== 'string' && !store[key].trim()) {
    return fallback;
  }
  return store[key] || fallback;
}
```