check Mongoid::Document, fixes #343