fixed nullPointerExceptions when doing all search but a result has no courses