prevent nil values to break
 changed model to model_or_key