use var for class name in null error