Better handling of printing NULL pointers