Added additional check for type in AppBarToggleItemCommand.OnAttached (see issue #4)