Why is newperson4 successfully created instead of producing an error? See the code below:
function person() {
}
var p = new person();
var q = null;
var r = "some string";
var newperson1 = Object.create(p); //Runs without errors.
var newperson2 = Object.create(q); //Runs without errors.
var newperson3 = Object.create(r); //Produces an error - Object.prototype requires an Object or Null only. That's expected!
var newperson4 = Object.create(person); //Despite the previous error message, person is a function and not an object. How is this working?