Handle NameError by setting model to nil on validation

Fixes #21
Version 1.2.0