model-helper: handle arrays with undefined items