correct check for undefined modelList variable