added validate_operand_size, works for types 3 and 4