model - bug fix

qid needs to be default earlier or the typeof != string results in a
false match.