First check if course exists