move required and allow_none to type rather than typemapper