Wrote an addIf function for lists that conditionally adds items to
lists