Unable to use Node::load Fatal error: Class 'EntityInterface' not found in /cptestd8/modules/custom/custom-autofill-reference/custom_autofill_reference.module on line 13

use Drupal\node\Entity\Node;
    function custom_autofill_reference_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {

      drupal_set_message($form_id);    

      if($form_id =='node_monitoring_report_form'){
        $field_school_information =  \Drupal::request()-&gt;query-&gt;get('field_school_information');
        $node_details = Node::load($field_school_information);
        $node = $node_details-&gt;field_FIELD_NAME-&gt;value;
        $form['field_school_information']['widget'][0]['target_id']['#default_value']=  $node; 

      }
    }


While trying to load the node I get error as shown below:


  Fatal error: Class 'EntityInterface' not found in
  /modules/custom/custom-autofill-reference/custom_autofill_reference.module
  on line 13


And line 13 is:

$form['field_school_information']['widget'][0]['target_id']['#default_value'] = $node; 


Drupal Version: 8.6.x
use Drupal\node\Entity\Node;

function custom_autofill_reference_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  if ($form_id =='node_monitoring_report_form'){
    $field_school_information =  \Drupal::request()-&gt;query-&gt;get('field_school_information');
    $node_details = \Drupal\node\Entity\Node::load($field_school_information);
    $form['field_school_information']['widget'][0]['target_id']['#default_value'] = $node_details;
  }


}


Above code worked finally and it was showing error as I did not clear the cache while trying to check it out.