remove nils from inputs