it's maybe better to check if it's an Entity object, no ?