Creation and save of document in node and Mongodb

MongoDB and Mongoose - Create and Save a Record of a Model

my code

var mongoose= require(‘mongoose’);
mongoose.connect("****");

var db = mongoose.connection;
db.on(‘error’, console.error.bind(console, ‘connection error:’));

var personSchema = new mongoose.Schema({
name : String,
age : Number,
favoriteFoods :[String]

});

var Person = mongoose.model(‘Person’, personSchema);

ar createAndSavePerson = function(done) {
var mr = new Person({name:‘Mrdude’,age:22,favoriteFoods:[‘Ice Creame’,‘Grills’]})

mr.save(function(err,mr)
{
if(err) return console.error(err);
});
done(null, mr);
};

i am not able to find this error

i am getting “Cannot read property ‘name’ of null” error

please point where i am wrong