Add check for NULL clazz