Use lodash's default() function

lodash provides a default function for this use-case. The previous code crashed with `Cannot read property of null` in line 50 when result was an object since config was still `null`.