test if classes not nil