accept null for class