kernel: Add check to of_scan_flat_dt() before accessing initial_boot_params