[gem5] Prevent function call on null controller.