No more TypeErrors: entity is null