check if entity has field drupal 8 code example Example: drupal 8 node has field $entity->hasField('abc')