improve the error message of EntityType of Funciton not found