Check data against nil before using it. On the other hand, using a print_status on a Scanner module for all the received data is not a good idea because the terminal can be flooded with lot of output. Indeed I would recommend just to report the important information through Msf::Auxiliary::Report