lib: formatLog: output undefined/null as "" for required keys

- these keys are expected to have string output
- tests.json
  - undefined -> "" in required keys test case
  - add test titles