Add guards for only SP IN/EXISTS