`model` can be empty, thus a check  or a try/catch is needed