fix for #330
Merge pull request #332 from coldnebo/master

prevent downstream nil exception when view_definition is nil.