Hm... i don't think that hard reference on same theme - good idea.
You should check a windowActionBar attribute from theme.
Like this:
```java
TypedArray a = context.obtainStyledAttributes(new int[] { android.R.attr.windowActionBar, R.attr.windowActionBar });
boolean windowActionBar = a.getBoolean(0) || a.getBoolean(1);
a.recycle();
if (VERSION.SDK_INT >= 11 && windowActionBar) {
...
```