Ensure model_data is a DbModel or compatible and use the appropriate methods to access.