Better type checking used for default sorting order of a model list.