check if model is undefined