Check if search view exists before trying to hide it