fix: testing not null predicate on a dynamic reference

did throw an excpetion
is it possible to test this in an analyzer or planner test instead? It is quite some overhead to run a separate IntegrationTest class