If ( $("#selector", text: "something", wait: 5, required: false).visible ) {
Foo
} Else {
Bar
}
Something like that? Sorry on the road and on mobile.
I don't see why you would want to use waitFor because that throws an exception if it doesn't return true.
You could also write two tests, one for each type of behaviour.
Given:
At page1
When:
$( selector ).click
Then:
At page2