added hooks for operations andThenBool and orElseBool
Merge pull request #971 from yilongli/fixing-issue-970

added hooks for operations andThenBool and orElseBool