Added check for currentcourse is null and alert for when it is null