Fix null reference exception if missing opts