added check to avoid update call for empty search box

Added check to avoid update call if search box is empty.