if function getValue() on null return nothing I looked around, but am not exactly sure how to ask this question.

Is there a means of not erroring out on "function getValue() on null". Basically I'd like to return nothing and move on if getValue is being called on something that doesn't exist.
You can check if a field is empty or not before asking for getValue() with:

if (!$entity-&gt;get('field_name')-&gt;isEmpty()) {
  $value = $entity-&gt;get('field_name')-&gt;getValue();
}