localStorage check in model.