check if model exists before creating