fixed teacher nil case for search courses