Add exception handling for null best_bss