Avoid potential null pointer deref of config