Update Component for check if a query exists.

To avoid the undefined index notice.