use safe bool idiom if no explicit type casts.