raise error if type is NOT included