Fixed NullPointerException when getActionBar() returns null #244

Fixes issue #244