Pooja/Ajay | #3587 | Check entity type before creating form_model and aggregation tree entry