add more assertions and an explicit static cast here

we're tracking down a "entity manager being null from componentmapper"
issue..