IF statement to check if loaded entity is of type
Like @Kevin pointed out, $type was never set. That was helpful.
I believe this works:
if($entity-&gt;type == 'course') {
  $entity-&gt;some_boolean = 0;
  $entity-&gt;content_status = 665;
  $entity-&gt;course_number = 3;
  $entity-&gt;tag_line = &quot;some other tag line here&quot;;
}

If you can improve this, please let me know. Much appreciated.