Fix null/undefined error when missing config