Add function to get default type and fix auto-setting prop.type