Issue #2166431 by Spleshka, marcoscano, Ravenight: Fixed php notice when working with other entity types.