Make `Packet.string_to_q_type` total without exception