dictify: drop attribute if it is None