type->typeof in validateCard fix