Finding nodes without a specific relationship

I need a query that finds nodes without a specific relationship. The following query works:

MATCH (e:Entity)
WHERE NOT (e)-[:CHILD_OF]->()
RETURN e

But neo4j browser gives me the following warning:

This feature is deprecated and will be removed in future versions.

Coercion of list to boolean is deprecated. Please consider using `NOT isEmpty(...) instead

I'm not sure how to modify my query as suggested.

In new version the syntax is:

MATCH (e:Entity)
WHERE NOT isEmpty((e)-[:CHILD_OF]->())
RETURN e

Small correction: remove "NOT". (Just in case)

MATCH (e:Entity)
WHERE isEmpty((e)-[:CHILD_OF]->())
RETURN e

While that works, neo4j browser gives a different warning.

This feature is deprecated and will be removed in future versions.

A pattern expression should only be used in order to test the existence of a pattern. It should therefore only be used in contexts that evaluate to a boolean, e.g. inside the function exists() or in a WHERE-clause. All other uses are deprecated and should be replaced by a pattern comprehension.

Maybe

MATCH (e:Entity)
WHERE not exists((e)-[:CHILD_OF]->())
RETURN e

FYI the following quit working in 5.x:

            WHERE isEmpty((e)-[:CHILD_OF]->()) AND e.id <> '#root'

I got the syntax error mentioned earlier.

I replaced it with the following, which works.

           WHERE NOT exists((e)-[:CHILD_OF]->()) AND e.id <> '#root'