Check that scan object is not None before printing