Check if class is defined instead of SDK version