Checks if entity has a component of the type of the given object.
bool hasComponent(Type type) { return components.value.containsKey(type); }