Edited so search text does not appear if search is nil

Signed-off-by: Beatrice Peng <bebepeng@gmail.com>