guard against MissingAttributeError during common ActiveRecord operations