>>896
引数がコレクションか否かまで判定する必要がある関数を定義したきゃ

def has_foo_in_collection(xs):
    return is_collection(xs) and has_foo(xs)

という関数にでもしとけよ