checking for nullptr