added Empty trait and to_opt