Add null check for apiCaller object