missing "None" check in search()