Exception in template helper: TypeError: Cannot read property 'schema' of undefined
<p>Not sure where I'm going wrong here, please kindly assist.</p>

<p>Please see error below. Thank You</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>////This is the client side JS////

if (Meteor.isClient) {
 Template.NewPerson.helpers({
  PersonSchema: function(){
    return schema.PersonSchema;
  }
});
}

////This is the schema////

Person = new Mongo.Collection('person');

Person.allow({
 insert: function(userID, doc){
  return !!userID;
 }
});

const PersonSchema = new SimpleSchema({
 FirstName: {
  type: String,
  label: "First Name"
 },
 LastName: {
  type: String,
  label: "Last Name" 
 },
 IdentityNumber: {
  type: Number,
  label: "Identity Number"
 },
 Address: {
  type: String,
  label: "Address"
 },
 PhoneNumber: {
  type: Number,
  label: "Phone Number"
 },
 User: {
  type: String,
  label: "User",
   autoValue: function(){
         return this.userId;
      },
      autoform: {
            type: "hidden", 
            label: false,
   },
  
  },
 
 //createdAt: {
 // type: Date,
 // label: "Created At",
 // autoValue: function(){
   
 // }
 // autoForm: {
 //  type: "hidden"
 //},
 
});

Person.attachSchema(PersonSchema);
Error:
Exception in template helper: TypeError: Cannot read property 'schema' of undefined</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>////This is the error////

Exception in template helper: TypeError: Cannot read property 'schema' of undefined
    at Object.quickFormContext (http://localhost:3000/packages/aldeed_autoform.js?hash=5dbf44ff89f182bd8c2512330e170ef4d5bf9582:6713:34)
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27
    at Object.Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
    at http://localhost:3000/packages/aldeed_autoform.js?hash=5dbf44ff89f182bd8c2512330e170ef4d5bf9582:6662:23
    at wrappedArgFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2903:14)
    at .&lt;anonymous&gt; (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2616:26)
debug.js:41 Exception in defer callback: TypeError: Cannot read property 'id' of null
    at .&lt;anonymous&gt; (http://localhost:3000/packages/aldeed_autoform.js?hash=5dbf44ff89f182bd8c2512330e170ef4d5bf9582:6551:22)
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1873:29
    at Object.Blaze._withCurrentView (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2214:12)
    at viewAutorun (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1872:18)
    at Tracker.Computation._compute (http://localhost:3000/packages/tracker.js?hash=f525263111eb9d90f4ce1ad064f97aca4a6c1b07:339:36)
    at new Tracker.Computation (http://localhost:3000/packages/tracker.js?hash=f525263111eb9d90f4ce1ad064f97aca4a6c1b07:229:10)
    at Object.Tracker.autorun (http://localhost:3000/packages/tracker.js?hash=f525263111eb9d90f4ce1ad064f97aca4a6c1b07:604:11)
    at Blaze.View.autorun (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1885:22)</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>////This is the client side HTML////

&lt;template name="NewPerson"&gt;
     &lt;div class="new-person-container"&gt;
   {{&gt; quickForm collection=Person id="insertPersonForm" type="insert" class="new-person-form"}}
  &lt;/div&gt;
 &lt;/template&gt;</code></pre>
</div>
</div>
</p>