Added missing 'hasComponent' method implementation.