fix nonetype error issue for searching
fix nonetype error issue for searching