Don't assume that model has id, some don't
Only print id if available
Merge pull request #1097 from njam/issue-1097

varDump: Model might not have id