check lpszheaders for nullptr, thanks to Accuvant